So I've been working on a squeal to deanej's Star trek mod for about 8 months now and it is almost ready to really go public (It's already semi-public).
One of the things I wanted to add was to be able to set the ships to GREEN/YELLOW/RED Alerts. But I am running into a bit of a bind in the python department.
In the original star trek mod there is a some code by TC01 that looks like this:
CvMainInterface.py
and
and there is matching promotions;
CIV4PromotionInfos.xml
copies of the files are here: http://sourceforge.net/projects/star...Patch%20files/
This works really well where if you hit the button it cloaks, hit it again and it decloaks. But these have a binary state, and what I need is a trinary state with three buttons for green/yellow/red. Ideally the active one greys out (or is brighter something like, basically a different image) and it switches to that promotion removing the other two promotions.
I know. Getting complicated. Anyway, I'm a bit lost here. I'm a pretty good coder but I'm having trouble understanding the CIV SDK (python is a bit foreign to me, but I think I understand it). If any one could help in anyway with this I'd be super grateful. And I hate to ask people to do my work for me, but If you would like to take this small code on for yourself, I'd of course happily give you credit as a coder on the project. I'm planning on having a full public announcement of the beta at the end of the month and this is really one of the last piece of the puzzle I'd like to have in place before I do.
Thanks in advance! (And of course any help at all will get you a special thanks in the credits)
One of the things I wanted to add was to be able to set the ships to GREEN/YELLOW/RED Alerts. But I am running into a bit of a bind in the python department.
In the original star trek mod there is a some code by TC01 that looks like this:
CvMainInterface.py
Spoiler:
and
Spoiler:
and there is matching promotions;
CIV4PromotionInfos.xml
Spoiler:
copies of the files are here: http://sourceforge.net/projects/star...Patch%20files/
This works really well where if you hit the button it cloaks, hit it again and it decloaks. But these have a binary state, and what I need is a trinary state with three buttons for green/yellow/red. Ideally the active one greys out (or is brighter something like, basically a different image) and it switches to that promotion removing the other two promotions.
I know. Getting complicated. Anyway, I'm a bit lost here. I'm a pretty good coder but I'm having trouble understanding the CIV SDK (python is a bit foreign to me, but I think I understand it). If any one could help in anyway with this I'd be super grateful. And I hate to ask people to do my work for me, but If you would like to take this small code on for yourself, I'd of course happily give you credit as a coder on the project. I'm planning on having a full public announcement of the beta at the end of the month and this is really one of the last piece of the puzzle I'd like to have in place before I do.
Thanks in advance! (And of course any help at all will get you a special thanks in the credits)