Hello. I've made a few mods that only changed sql and xml before, but wanted to try my hand in lua next.
I've used lua before, but what I'm not sure I understand is how Civ5's functions work with it, so I was hoping that by asking specific questions and showing my code, someone would be able to pinpoint my misconceptions.
My first question has to do with a mod that I want to make. It would make it so when a city-state founds their capital on turn 0, that city is immediately conquered by barbarians.
Figured this one out, after multiple cases of switching
Next is another mod I want to make, which randomizes a leader's personality every time they enter a new Era.
This one would require DLL modding, so that's it for that.
And my last (for now) question is how to see the messages from the print commands? I already have logging enabled, but none of them show the messages so I'm not even sure my mods are being applied.
It was because I was using a mod template that did set .lua files as the mod's contents.
And this isn't really a question but when I searched the wiki for https://modiki.civfanatics.com/index.php?title=Special:Search&limit=500&offset=0&profile=default&search=player:get a bunch of scam links showed up. I'm not sure if the wiki is actually being updated but in case it is, I thought it'd be good to report this.
I've used lua before, but what I'm not sure I understand is how Civ5's functions work with it, so I was hoping that by asking specific questions and showing my code, someone would be able to pinpoint my misconceptions.
Figured this one out, after multiple cases of switching
.
for:
and vice-versa, and hooking the wrong function. The working version was published in the Steam workshop in case someone has a similar issue/objective.This one would require DLL modding, so that's it for that.
It was because I was using a mod template that did set .lua files as the mod's contents.
And this isn't really a question but when I searched the wiki for https://modiki.civfanatics.com/index.php?title=Special:Search&limit=500&offset=0&profile=default&search=player:get a bunch of scam links showed up. I'm not sure if the wiki is actually being updated but in case it is, I thought it'd be good to report this.
Last edited: