[SDK MOD] Action Buttons 2.0

talchas said:
use kill(true...) not kill(false...) for anything called from the actionbuttons stuff.

What is the difference between using true and false, besides crashing?
 
True delays part of the actual cleaning up of the unit (which among other things, sets the group to null) until group->doDelayedDeath() or something like that is called, which is done after everything in the doCommand area that needs the group to be nonnull is done. Why kill(false) is needed, I'm not sure.
 
Thanks, that worked... now its time to test my code to make sure it really works... :D
 
Is there a warlords version of this mod/lib? I was going to try and merge the changed code into the warlords sdk myself but I figure I'll ask before I go to the trouble.
 
I haven't made one, because I don't have warlords.
 
I ended up merging it last night since it didn't look too bad. The warlords source files look like the same files as the original sdk with just a few additions to them and your BEGIN & END comments made it real easy. I got it to compile but haven't had a chance to test it yet.
 
Hi

I wonder if the Warlords version by robk is Warlords v2.08 Patch compliant. I can't seem to get it to run in with just the WL dll-file in the assets folder.

thanks in advance
 
I wonder if the Warlords version by robk is Warlords v2.08 Patch compliant. I can't seem to get it to run in with just the WL dll-file in the assets folder.

Nah, it's not. With that patch, or one of the earlier ones, a lot of the source files for the DLL changed and I haven't taken the time to re-integrate it.
 
Here's an example of use Mod Conscripts 0.1 - thanks for a great SDK-SDK :).

For future versions I would like to see tags for technology and unitclass requirements, not only promotion requirements. I resolved this by passing the requirements as parameters to the functions: (see above thread for python code):
Code:
            <PyResult>Conscripts.doConscript(pUnit,'UNIT_ARCHER','PROMOTION_CONSCRIPT',25)</PyResult>
            <PyRequirement>Conscripts.canDoConscript(pUnit,'UNITCLASS_WORKER','TECH_ARCHERY')</PyRequirement>

Also I excluded the if bTestVisible: return true lines of doConscript()/canDoTest1() to stop the new buttons from being showed (greyed out) for all units.

Hopefully these two tricks can be an inspiration and help to other mod-newbees like me.

yepzer
 
just uploaded the Moderator Action: conscripts 0.1a (see link in signature) as an example for you.
Please read the forum rules: http://forums.civfanatics.com/showthread.php?t=422889
Moderator Action:

K, great thanks. Not good with the Python just yet.

Just a side note, yepzer, you should take a look at what esemjay is doing. Turns out his mod sounds very similar to your Spec Ops Mod, but he has many crazy functions for his new unit. Here is the link:

http://forums.civfanatics.com/showthread.php?t=261309

I will probably be making a transport helicopter here as soon as I find a cool helo skin. It will be invisible to allow for stealthy insertions to complement the new Special Operations unit he is making. LOL, yes, I know. Simple modding for now for me!

Please read the forum rules: http://forums.civfanatics.com/showthread.php?t=422889
 

Attachments

  • gunship_128_stealth.zip
    21.7 KB · Views: 98
Top Bottom