Manage Pacts Hardcoded?

So I have two new races I am modding as add-ons to the game and wanted to move my wip mod over to diplomacy so I could add race specific pacts I have defined.

 

My problem is it appears that alliance types are hard coded to existing pact types only. I can setup my race specific pacts to re-use the existing alliance types which wouldn't be too bad, but...

 

The "Manage Pacts" screen under the diplomacy section is hard coded to show the pact names from the original races. I was hoping it would pull the pact name based on the research file for the race but it appears to be hard coded to go to specific string names based on allianceType.

 

The only work around I can come up with currently is to pull in the existing RESEARCH_PACTUNLOCK_XXXX entities and give them new name and description strings for their races respective diplomacy research trees. I can then modify the existing name and description strings to be more generic for the "Manage Pacts" screen. I'm also planning on using a generic pact button graphic for the "Manage Pact" screen as a result too.

Anyone else run into this and maybe come up with a better solution?

 

Thanks, ZombiesRus5

Example with the Trade Pact renamed to Pact 1:

 

 

8,946 views 9 replies
Reply #1 Top

My problem is it appears that alliance types are hard coded to existing pact types only. I can setup my race specific pacts to re-use the existing alliance types which wouldn't be too bad, but...
End of quote

Ughh, not being able to add new alliance types really blows. Here is my current issue in a nut shell.

Added a new supply pact that increases capital supply (allianceType=SupplyPact).

Works great, except if you ally with a TEC player. Why, because he also has an allianceType of SupplyPact you get both the increase in Capital Ship supply and Fleet Supply regardless of whether the TEC player has researched it or not.

 

Reply #2 Top

Here is what I have so far. Although it still has the issue if a pact is made with the same alliance type you get the corresponding pact bonus whether it has been researched or not by your ally. I wish pacts weren't locked down to the three races as I really wanted to add on two new races with unique pacts.

My other option is to go back to reusing the existing pacts which isn't nearly as fun.

 

Engish.str - Modified base pact names to be generic.

 

StringInfo
ID "IDS_RESEARCHSUBJECT_PACT_TRADE_NAME"
Value "Diplomatic Pact"
StringInfo
ID "IDS_RESEARCHSUBJECT_PACT_TRADE_DESCRIPTION"
Value "Two factions agree to share secrets, mutually improving both empires."

 

 

 

English.str - Renamed existing pact id's to be IDS_RESEARCHSUBJECT_PACTUNLOCK_[pact]_NAME.

 

StringInfo
ID "IDS_RESEARCHSUBJECT_PACTUNLOCK_TRADE_NAME"
Value "Trade Pact"
StringInfo
ID "IDS_RESEARCHSUBJECT_PACTUNLOCK_TRADE_DESCRIPTION"
Value "Two factions agree to share trade secrets, mutually improving trade income rates for both peoples."

 

Modified existing research subject entities to reference new ID's.

 

RESEARCHSUBJECT_PACTUNLOCK_TRADE.entity

NameStringID "IDS_RESEARCHSUBJECT_PACTUNLOCK_TRADE_NAME"
DescriptionStringID "IDS_RESEARCHSUBJECT_PACTUNLOCK_TRADE_DESCRIPTION"

Reply #3 Top

Whomever designed the Pact system for Diplomacy either needs an award for completing this so quickly during the public Beta or needs to be scolded for designing such a modder unfriendly framework for what is a fairly moddable game. At the current moment I am for the latter. :thumbsdown:

Reply #4 Top

If we yell at Ironclad enough they may un-hardcode it.  Capital ship names used to be hardcoded to the three base races, but they changed that.  Eventually.

Reply #5 Top

Quoting SpardaSon21, reply 4
If we yell at Ironclad enough they may un-hardcode it.  Capital ship names used to be hardcoded to the three base races, but they changed that.  Eventually.
End of SpardaSon21's quote

What?  When did that happen??

-dolynick

Reply #6 Top

One of the patches, I forgot which.  It was pre-Diplomacy.

Reply #7 Top

I've spent a lot of time trying to figure out how to best go about defining new pacts. It required a chainsaw and some creativity to be able to introduce 6 new pacts (3 for each new race). Unfortunately this required me to remove 6 pacts from the original races (2 each removed). It was worth it though as using the base pacts weren't that fun anyway IMO.

BTW, having the same allianceType researchable by both sides had some wierd issues, like one side of the pact bonus not taking affect until you dropped the pact and re-established it. I decided it wasn't worth it and went to the idea presented in this reply which removed 2 less useful pacts from each race.

Reply #8 Top

Any way to add races yet?

Reply #9 Top

New races can still be added, it's just new pact/alliance types that cannot to my knowledge. This is why I canabalized some of the existing pact types to atleast add some spice for my two new add-on races.

I apologize for the diatribe on this, it was just a little frustrating to be limited to the existing pact types.