Hey all,
LUA is utterly foreign to me. Seems logical enough, but I haven't the time to invest dozens of hours trial-and-erroring my way through it. Anyways, here's the question:
Is it possible to use a LUA script to modify a value from the <defines> part of the database? What I want to do is pretty simple: at a technology in which one of my later diplo units for CSD is unlocked (say, Civil Service), I would like to have the game bump the influence value of a trade (diplomatic) mission by a set amount (say 5, for example's sake). So, in other words, the LUA would roughly look like this (abstractly-speaking):
if playerx has tech x (writing),
then MINOR_FRIENDSHIP_FROM_TRADE_MISSION should equal 35
if playerx has both tech x (writing) and tech y (civil service),
then MINOR_FRIENDSHIP_FROM_TRADE_MISSION should equal 40
And so on for each necessary tech in the tree.
So, is this possible with our current set of tools? If so, I'm willing to learn how to make it happen, however I might need a bit of help from anyone who is willing. CSD will be the better for it if I can finally implement a scaling influence system.
Thanks in advance,
Gazebo
Moderator Action: Moved to main C&C forum.
LUA is utterly foreign to me. Seems logical enough, but I haven't the time to invest dozens of hours trial-and-erroring my way through it. Anyways, here's the question:
Is it possible to use a LUA script to modify a value from the <defines> part of the database? What I want to do is pretty simple: at a technology in which one of my later diplo units for CSD is unlocked (say, Civil Service), I would like to have the game bump the influence value of a trade (diplomatic) mission by a set amount (say 5, for example's sake). So, in other words, the LUA would roughly look like this (abstractly-speaking):
if playerx has tech x (writing),
then MINOR_FRIENDSHIP_FROM_TRADE_MISSION should equal 35
if playerx has both tech x (writing) and tech y (civil service),
then MINOR_FRIENDSHIP_FROM_TRADE_MISSION should equal 40
And so on for each necessary tech in the tree.
So, is this possible with our current set of tools? If so, I'm willing to learn how to make it happen, however I might need a bit of help from anyone who is willing. CSD will be the better for it if I can finally implement a scaling influence system.
Thanks in advance,
Gazebo
Moderator Action: Moved to main C&C forum.