Logo Platform
logo amplifiers simplified

Answer to a MP from iblise

Reply
Copied to clipboard!
12 years ago
Aug 21, 2012, 9:04:32 AM
Hi there !



During my holidays (yes I get some... And guess what? I liked them ^^), I get a MP. As I always say, when someone ask something, then at least another one have the same question but does not talk... (sounds better when I write it in french...)



So here is the question from iblise :

I've been wondering about a lot of things, but while considering monopolies I realized that even if I did identify a means by which to determine the total number of resource X in the galaxy, I still wouldn't be able to do set it to so only 80% or available resources controlled by player would trigger the monopoly bonus. The question is, one I find myself at continous odds with again and again, is why isn't some sort of higher math allowed to be programmed in? I'd love to do a formulas that are more complex then add / subtract / multiple / divide. Is it, will it be possible to do at least greater than and less then? I realize the devs have already commented on the event triggers as a todo but is more complex math on the radar? or is this a scripting limitation of xml?



Also, I'd love to bounce further questions off a dev when you have time (hah) I've hit a brickwall in a few areas in regards to modding



Cheers




-> Monolpoly bonus related.

The monopoly bonus are based on a number of resources controlled by a player, regardless of the number of resource in the galaxy. You can find the limits in the Registry.xml. It is named "ResourceMonopoly".

You will not able to modify this with some "descriptor" nor compute it on the fly nor define the limit differently for a strategic or luxury...



-> Why is not some sort of higher math allowed to be programmed in?

Because. ^^

In fact, when we think the simulation at the beginning of the project, we bet that we will be able to do all "simulation computation" with some basic operation.

The point is : when you allow complex operation, how will you explain them to the player?

So, for now, we allow only addition, multiplication and percentage. You can also use some "Priority" on the modifier to say "this modifier must arrived after all other modifier, regardless of his operation type".



-> Will it be possible to do at least "Greater than" and/or "Less than"?

Well, I am not sure of what you are talking about but there is an interpreter which use "gt" and "lt" as respectivelly "Greater than" and "Less than" to interpret all path. So if you are talking about adding some comparison in the "PathPrerequistes" or "AIPathPrerequistes" xml tag, then you can already doing it.

But if you are talking about using comparison in the "simulation computation"... I just cannot see how I can do that.

The simulation is just a big calculator... and calculator does not use some logic to work. The logic is done elsewhere.

If you have a example, I will try to explain how to do it or at least define if it is possible or not with the current simulation.



-> Is this a scripting limitation of XML?

No.

Xml is just a text format. You can write any data you want in xml, even a power or a comparison operator. The problem is "we need to implement them first in our interpreter, then choose a xml representation". Complex math are currently not implemented not because xml cannot do it, but because we have not need them before.



I hope this answer your questions !



Cheers,

Flo
0Send private message
12 years ago
Aug 21, 2012, 1:19:42 PM
I must confess, what is MP? Message Private? The french always do everything in reverse darn syntax organization lol. Well, darn about regarding the monopoly bonus, I suspected this was the case but I really want to apply a condition where the player only received the bonus when they controlled 80% of the resource on the map rather than a static '4'. Which is why I would need the ability to see if it was greater than 80%. I was think a rough code along the lines of (lots of made up stuff in the code below hah):



[code] [/code]



But without a way to confirm if that supposed value (even if the made up code worked) was greater than 80%... (gt 0.8 ?)Makes sense about what you said requiring an interpreter section in the actual program itself. I need to look into this gt and lt you mention about (heading out the door to work here shortly)



[Code] count(ClassStarSystem/ClassPlanet/MoonStatusExplored) gt 1 [/Code]



Looks simple enough, hmmm
0Send private message
12 years ago
Aug 21, 2012, 2:18:18 PM
Yeah, well, let said that I use PM ok? It is not like if I have to write some English to answer question about a french game, isn't it?

Will you prefer a French text? ^^

I would certainly make less mistakes ^^



I'm currently thinking about a way to doing what you say and... well... I do not find any for now.



- You can build a descriptor which will represent the bonus to add to the empire which get 80% of a resource.

- You can define a property which will sum the resource of an empire.



- I am not sure you can define how much of a resource is out in the space... but let say you can modify the galaxy generator to generate a defined amount of each resource (hard coded by you).



-> Now the problem is, how can you implement a logic which is not already in the gameplay logic...



The AIPathPrerequisites is only used by the AI to know when it could build a improvement or not (avoid building moon improvement when the system has no moon for example).

The PathPrerequisites is only used by the gameplay to define when you could build a improvement or not (not the right system or resource or previous building, etc).



We have no way to add some rule which say "Add this descriptor on the empire when ..." with the xml. At least for now.



I just talk about it with Loic, Maxence and Rémi and I can confirm you two things :

-> You cannot add "rule" to add a descriptor during the game for now.

-> We add this capability under code name "Trigger event" on the improvement list for the modding. But I cannot give you any information about when we will start to work on it nor its priority for now... This will be decided in the following weeks I hope...



Sorry... I always prefer when I am able to found a solution or, at least, a work around... When I am not able, I always feel like we have doing something wrong somewhere... and that's not a really good feeling ^^



I hope you will found a work around or another interesting way for modding this...



Cheers,

Flo
0Send private message
?

Click here to login

Reply
Comment