Logo Platform
logo amplifiers simplified

Is it possible to create a source.something // Help

Reply
Copied to clipboard!
3 years ago
Nov 16, 2021, 6:43:25 PM

So me and my friend are attempting to create our own first mod. We are attempting to create 6 new cultures one per era.

For Norte Chico we could do it with relative ease using what is given in unity.

However with the second culture Odrysian Kingdom, we are struggling because we want to give a percentage buff based on how many in your empire are not of your culture.

So when looking around we saw that Arabia multiplies the percentage buff with the amount of alliances by saying 0.05 * Source.DiplomaticRelationAllianceCount. 
My question is if it would be possible to create a file Source.CitiesInfluencedByOtherNations, and where that file should be for it to be visible. 
But yeah the question might not be stupid, and ones i find the source files or at least know somewhere, where i atleast have a chance to enter code, i might still not manage to do what i want. 
But i thought before we give up on doing this with thought it was worth asking. 


0Send private message
3 years ago
Nov 16, 2021, 6:49:17 PM

Hi !


Small, short answer, saddly you can't.


Long answer :


The things like Source.DiplomaticRelationAllianceCount are actually reference to properties  of SimulationEntities, I don't know where you found the Arabia bonus but looking at it I would say it's a RPN (a formulas) that take a Source and a Target Entity. Here the entity is a MajorEmpire that have a property DiplomaticRelationAllianceCount (if I'm not mistaken). I think this property is actually an EditableProperty, this mean that this property cannot be modified by you, but is modified by us in our code. But you can use this property to do calculation (like the Arabia bonus). Some other properties are "simple" properties that you can modify in descriptor.


Sadly, because you can't really modify the source code, you won't be able to add new properties so I think you won't be able to do what you want.

0Send private message
0Send private message
3 years ago
Nov 16, 2021, 7:17:55 PM

So i can find some of the RPNs for units like all the production costs.
However i struggle finding the different RPNs for MajorNations and right now i can only find the ones that are used by some nations. 
For example Babylon Source.NumberOfUnlockedTechnologies, Arabia and Byzantium Source.DiplomaticRelationAllianceCount, Ghana Target.SumOfLuxuryResourceAccessCount. etc.
Is there anywhere in the modding tool a list of all the possible source. and target. 

0Send private message
0Send private message
3 years ago
Nov 16, 2021, 8:05:30 PM

The effect was modified a little bit but in the end i solved it with.
0.05 * ( Source.TerritoryCount - Source.NumberOfCulturallyControlledTerritory)

Updated 3 years ago.
0Send private message
?

Click here to login

Reply
Comment