Advanced Unique Abilities

Yottakon

Chieftain
Joined
Aug 5, 2015
Messages
18
Currently, my mod's UA is that he earns great people quicker, and gets a free Great Engineer. However, I was thinking of creating something more unique. I was thinking that his ability should be that City States will not go to war with you (this includes going to war with a major civ who is allied with these city states), unless you declare war on them. However, I'm not really sure how to do that with the limitations in their list of UAs. Is there a certain programming language I need to know to create one. If so, does someone have a guide on doing it.

Also, just for quick help, does anyone know how to change the amount of tourism a great writer gives (I want it to give out 3 tourism instead of too).
 
Both would require Lua, which unfortunately I am not well versed in.

I do know that JFD's Switzerland mod prevents city-states from declaring unprovoked, as part of the UA. Perhaps poking around the code there could shed some light?
 
Oh, well coincidentally I do have the Switzerland mod. I don't remember that part of their ability though. Well, it looks like I'm going to have to figure out how to use Lua, unless someone here gives a guide or something.
 
Sorry for the waiting! PM doesn't allow attaching files, so I decided to post it at your Advanced Unique Abilities Thread instead.

Here are some Lua Template Files you can look at (you need WinRAR to open them). The first one, JFD's Russia Lua file, is the one with the Acquiring Tiles function, though it needs some other files, such as PlotIterators.

The second one, my Son Gohan SSJ Transform Lua File, is an example for an advanced Lua file (most functions are taken from Vice Virtuoso's Neptune Lua file, with some functions directly written by me, but it's currently still untested)

Lua Coding's not easy, and I'm also struggling with the coding, but it also helps to reverse-engineer some of the other's Mods to figure out how they should work (not always, but pretty often)

I do have plenty of different mods with various Lua Coding files, so these functions aren't the only ones.

You can use the Lua functions if you like, but if you want, you can credit the original authors where the coding comes from ;).
 

Attachments

  • Lua Files (for Testing purposes).rar
    10 KB · Views: 42
Top Bottom