JHGuitarFreak / UQM-MegaMod

A fork of The Ur-Quan Masters + HD-mod that remasters the HD graphics with a veritable smorgasbord of extra features, options, QoL improvements, and much more...
https://uqm-mods.sourceforge.net
GNU General Public License v2.0
80 stars 22 forks source link

Druuge Trade HQ reverts it's name to Planet I #57

Closed Kruzen closed 4 years ago

Kruzen commented 4 years ago

Because name display tied to Druuge SOI tracking, when they get destryed by Kohr-Ah, name gets reverted. I tried to find a couple of game states to untie it from sphere tracking. So the final conditions are (must be at least one true of 3); 1) !GET_GAME_STATE (DRUUGE_MANNER) && (GET_GAME_STATE(DRUUGE_VISITS) >= 1 This will be true if we met a druuge and he said its intro line about their world. If we decide to attack them on first encounter or they will try to salvage SIS this condition will be false 2) GET_GAME_STATE(DRUUGE_HOME_VISITS) >= 1 This will be true when we visit their world and listen to the intro. No matter our state with space Druuge, their homeworld will be friendly until we get the Utwig Bomb 3) GET_GAME_STATE (ROSY_SPHERE) This will be true when we acquire Rosy sphere to the end of the game. Because after bomb encounter all VISITS states drops to 0, name will be reverted back again. But it is unlikely we get the bomb before sphere (or it is too late in the game anyway). Even if we never met a Druuge, they got destroyed and we come to pick sphere, name will be set to Trade HQ which is acceptable.

The only downside is if we met 1st Druuge and talk to him and then attack the 2nd one, the name will be reverted. So the ultimate solution will be adding new game state so it will switch to TRUE during NPCPhrase (INIT_SPACE_HELLO) and NPCPhrase (INITIAL_TRADE_WORLD_HELLO) and name will be displayed when new cond will be TRUE or ROSY_SPHERE is TRUE.

Serosis commented 4 years ago

I have a couple of ideas mulling around that will use a combination of all of those game states plus seeing if there's a gamestate for selling anything to the Druuge. Logically if you've sold something to them you should know the planet.

Serosis commented 4 years ago

I slapped your first two ideas into a temporary fix in commit 4e107bac7a36071c5ba2e86c0cdad625252d77f6

Kruzen commented 4 years ago

There is no state as far as I know directly tied to selling stuff (actually there are but for every artifact, so I think it is not efficient to use 6 states here), but (GET_GAME_STATE (DRUUGE_HOME_VISITS) >= 1) kinda covers it because you can't sell anything outside their home planet and this condition is true once you arrive here first time. As for || CheckSphereTracking (DRUUGE_SHIP), this makes useless !GET_GAME_STATE (DRUUGE_MANNER) cause sphere starts tracking even if you attack them and didn't know anything about their homeworld. I will think of a better state combination.

Kruzen commented 4 years ago

Fixed by adding various states to MET_A_DRUUGE