Logo Platform
logo amplifiers simplified

Force reload of games files with modding tools enabled? ?s on FLAGS,Hidden,UnlockHidden

Reply
Copied to clipboard!
5 years ago
Mar 29, 2020, 5:25:52 PM

  Trying to make first contact with minor civs dependant upon a tech. Haven't been able to find how to reload the game files (specifically the \simulation XML files) while in game so that I can keep trying different things till I figure out the correct syntax/way. Currently have to exit game, make change in file, restart game, and then enable mod which is annoying and time consuming.


  While I'm here does anyone have a compiled list of what all the FLAGS="..." can be and what they do?


  How about UnlockHidden="..."? What does this do? I've changed it's value but haven't been able to determine exactly what it does.


  Same goes for Hidden=".."? What is it's purpose and why would you use it?

0Send private message
5 years ago
Mar 29, 2020, 6:19:16 PM

Well I figured out how to add tech to enable first contact possible BUT I had to do it in a way that defeats the MOD capabilites of the game. In order to make it work I had to edit the original game file as when I had the mod enabled it wouldn't work. Do I have to declare the mod type as something special other than Extension? 


When would you use Conversion instead of Extension?


When would you use Standalone? Does Standalone mean you have to include every single file of the game? I tried using that one before and it crashed the game by not showing a UI at the home screen (log file said something about game UI not found or the likes).

0Send private message
5 years ago
Mar 29, 2020, 6:41:38 PM

I forgot to add the ExtraType for the file in question in my mod file. That is why it wouldn't work when the mod was enabled.

0Send private message
5 years ago
Mar 29, 2020, 8:14:37 PM

Turns out the game will 'reload' the files you specify in your mod file which makes this much faster now that I figured this out. If you want to make a change to your mod then exit to main menu, unload the mod, make your changes, then reload the mod.


0Send private message
5 years ago
Mar 29, 2020, 8:38:57 PM

What I was trying to do was this:


You make first contact with minor civ and you don't have the tech required to interact with them. Thus you are unable to make first contact. I wanted the 'make first' contact stay active until you have researched the required tech. I managed to get it semi-working and along the way discovered what the Discard property does. Let's look at the a snippet of the code for what I was trying to do:


<EmpireDiplomaticAction Name="FirstContactEmpireAction" ResultingDiplomaticRelationState="DiplomaticRelationStateMinorNeutral">

....

<StatePrerequisite Inverted="false" Flags="Prerequisite,Discard" Hidden="false" State="DiplomaticRelationStateMinorUnknown"/>

....

</EmpireDiplomaticAction>


In the above if I leave the Discard property in it seems to 'throw away' the StatePrerequisite the next time (and every subsequent time) this EmpireDiplomaticAction is triggered. Thus the next time it's triggered the minor civ screen will not show the make first contact box above the praise box and the ability to praise is enabled (if you have the required tech). This is unwanted.

On the other hand if I remove the Discard it 'remembers' the StatePrerequisite and the next time (and every subsequent time) this EmpireDiplomaticAction is triggered the make first contact box is shown above the praise box BUT the moment you reasearch the required tech you have the ability to praise even though you haven't made first contact. Still unwanted.

I should also mention that once you physically move a unit to the minor civ's node you immediately start gaining influence with them (+1/turn) even though you haven't made first contact yet. Very unwanted. But this is more of an annoyance at the moment.

It appears that with the Discard removed it's setting the ResultingDiplomaticRelationState to something other than DiplomaticRelationStateMinorUnknown as you have the ability to praise when you research the required tech. Maybe setting a temp variable and checking it with some other code will give me the desired effect.


The end goal wanted is you cannot make first contact unless you have the required tech and you 'pay' (and you gain no influence with them until first contact is made). When first contact is finally made you get a 'praise' for finally doing it.

0Send private message
5 years ago
Mar 29, 2020, 8:55:34 PM

Let me revise the above. With the Discard in AND you make contact via probe everything works correctly (no influence generated/turn either). With the Discard in AND you make contact by bringing a unit to it's node it doesn't work (influence generation of +1/turn). This tells me that there is some other file that needs to be modified as it's looking at the unit vice probe interaction.

0Send private message
5 years ago
Mar 30, 2020, 12:25:23 AM

It appears that once a unit moves to a node with a minor faction it's never encountered before it's hard coded to change diplomatic relation from unknown to neutral or something else. Thus you have effectively made first contact by moving to the node.


What I ended up doing was if you want to estabish first contact with a minor civ using probes you have to have the required tech and it will cost 50 + (50 * dust inflation factor). Thus if you want to avoid the cost you have to bring a unit to them to establish first contact. If you pay the cost (using probes) you are rewarded just as if you had praised them so you start gaining influence/turn.


This should slow down the rate at which the AI assimilates minor civs and give the player time to utilize them.

0Send private message
?

Click here to login

Reply
Comment