Modding and Firaxis

Both true. The 70's were actually populated by real people, it isn't just a fictional environment where they all walk around really fast and jerky in black and white clothes. Teams of people might be large or small just like 200 or 2000 years ago - prob the pyramids project was quite a large team for example :lol:

But the art of programming is twice as old now so it's natural the magnitude of what can be achieved per person is much greater. I would put that down to maybe 25% improvement in computer languages and project management, and 75% cultural, in that (a) people grow up using computers form an early age, and (b) computers are a central part of society as a whole - e.g. the internet.



Hope I didn't insult anyone's favourite - like most of my posts I was trying to make a lame joke first and foremost. Seriously I've never used LUA but several posters were saying it's a bit unconventional so I'm curious. One I really enjoyed on the mainframe was "Filetab", which was a bit like creating a su-doku puzzle for the computer to solve at run time and achieve some objective as a by-product. Totally impractical and unreadable afterwards, even by yourself when you came to fix a problem 2 weeks later. Great fun to write though :)

Lots of modern languages are well designed. Object orientation has I hope now become de rigeur so that's important, but otherwise it has to be horses for courses. I'm a systems progammer so it's C++ 99% of the time, and I think it's close to perfect for that.

C++ and Lua go together well
 
Here is a noob type question for a developer.

Will Civ 4 and Civ 5 be in the same code/graphics for modding?

What is the best way or place to go to learn how to mod for Civ?

Thanks.
 
I think they said that there was a new graphics engine, but i'm not sure. You almost certainly won't be able to just use the Civ4 code and use it in Civ5. It will require some editing, as the game will be written differently.

For art however, it may be possible to convert old units into the new civ5 format.
 
Here is a noob type question for a developer.

Will Civ 4 and Civ 5 be in the same code/graphics for modding?

What is the best way or place to go to learn how to mod for Civ?

Thanks.

I don't think anyone is going to be able to answer those questions until after release unfortunately.
 
LDiCesare said:
Global variables in lua are a problem. I work with lua and sometimes you forget a 'local'. It messes everything very very fast, in part because there is no variable declaration as in C.

One thing I discovered recently is "strict.lua". My understanding of it is that if you require it in a lua file, it makes it so you have to "declare" a global variable with a function called "global" before you can use it, otherwise it will throw an error. If you have trouble with forgetting "local" this might be useful, however, I'm guessing it hurts performance a tiny bit. (then again you can just get rid of it for a "release build.")
 
I'd assume that most of the guts of the DLL will look the same, a unit class, a city class a tile class etc etc, some class or classes that stores and provides all the XML data.

Civ4's code is not at all tricky or complicated they don't use things like function pointers, there's not even much inheritance just some very straightforward objects exchanging data. If you want to add new effects and data members to the existing objects that's about the easiest thing to do in the DLL. Doing AI support is a bit harder as you really need to fine tune that and actually know how the new feature 'plays' (or existing features if your going to go Blake's route). Adding whole new high level concepts/objects would be very tricky as you'd need to manage their construction/initialization and do big chunks of AI from scratch. I suspect anything to do with the graphics engine will off limits.

I'd just recommend people brush up on C++ to get ready. In CivIV DLL mods had a lot more flexibility and variety then Python 'event driven' stuff. The biggest drawback of Python was the inability to do any AI support, it was also messy way to convey game data that a DLL mod would use a new XML tag for. I suspect LUA (or any other scripting language Firaxis could have chosen) will have the same issues and will take a backseat to DLL modding, especially because much of our modding community has gotten familiarized with C++ over the course of CivIV.
 
This is probably a stupid question, but what would LUA be most analagous to in Civ4? From what I gather it would be the python but I just want to check. If it is analagous to the XML, based on what I've seen of LUA, I'm scared.
 
It's the python equivalent, the two languages are broadly similar and fill the same 'niche' in game design. If you know Python then many of LUA's concepts will be familiar too you, though their will be a few quirks unique to it. If you only know C/C++ it will seem very weird. LUA is a very young language and seems to be growing in popularity and supplanting Python.
 
Personally based on what I've seen here LUA looks pretty ugly. I like Python's structure though, which most of you seem to not like. I mean, yeah the whitespace thing can be a PITA, but at the end of the day it basically just forces correct indentation, which I don't find to be a bad thing. Before I even started to code I could look at python and understand, it's syntax is very straightforward, I can not say the same for snippets of LUA code you lot have posted. Of course the main issue with python is one of performance, so I understand why the civ5 devs are dropping it. I just think you guys are dead wrong on pythons structure and syntax, it's very direct and quite elegant actually.
 
Personally based on what I've seen here LUA looks pretty ugly. I like Python's structure though, which most of you seem to not like. I mean, yeah the whitespace thing can be a PITA, but at the end of the day it basically just forces correct indentation, which I don't find to be a bad thing. Before I even started to code I could look at python and understand, it's syntax is very straightforward, I can not say the same for snippets of LUA code you lot have posted. Of course the main issue with python is one of performance, so I understand why the civ5 devs are dropping it. I just think you guys are dead wrong on pythons structure and syntax, it's very direct and quite elegant actually.

you can keep your precious whitespace in Lua, BTW Lua is a word not an acronym; Lua means moon in Portugese
 
Personally based on what I've seen here LUA looks pretty ugly. I like Python's structure though, which most of you seem to not like. I mean, yeah the whitespace thing can be a PITA, but at the end of the day it basically just forces correct indentation, which I don't find to be a bad thing.

Yea I love white-space flow control, I've always indented religiously before coming to python so for me it wasn't really 'forcing' anything on me. The thing I like most is that the code is so compact vertically, you save a ton of lines omiting all the closing brackets that would otherwise each up half the lines in a properly formatted zigzag shaped C structure. Being able to just SEE so much code on screen at the same time is great.

Even LUA has 'end' commands which will produce that same zigzag look, though I imagine they do provide some improvement in parsing speed.

you can keep your precious whitespace in Lua

Actually, no, Lua (your right its not an acronym) dose not have white-space flow control, it follows traditional C style 'ignore white-space' rules. White-space flow control means the indenting of each line determines ware a control structure such as an 'if' or 'for' statements ends. It's arguably the most radical feature of python.
 
Mods for Supreme Commander and its expansion Forged Alliance could use lua. I remember downloading a mod I liked and changing some of the code to better suit my needs/wants. As an amateur modder, I didn't find it too difficult which is an encouraging sign IMO.

Also, I got the impression lua is commonly used in GUI mods (am I just stating the obvious?). I played MP a lot in SCFA so the only mods useful to me were UI-only mods. From my limited looks at WoW mods I think they're all UI mods too, right?

Does this mean we're going to see some awesome UI mods for Civ5? I and many others thought BUG was a great mod but many players who prioritised speed could not bear to play using BUG because it added a non-negligible amount of slowdown, presumably because of the python interpreter. (EmperorFool can correct me if I'm horribly wrong!)

This is the main reason I'm looking forward to seeing lua for civ5. It may have some quirks but its lightweight nature and the fact it's almost certainly faster than python for most modding tasks is a big plus in my books.
 
It's probably the way they'd make custom maps. But for buildings and units, a visual editor doesn't allow one to add new capacities (like throwing a fireball as was done in FfH). For advanced modding (stuff you couldn't do with an editor), a programming language is needed.

Well ... there's alot a visual editor could do with units (or buildings), though. You could assign different abilities, unitclass promotions, basic stats, and so on. Assign graphics and all that. Mods may use different schema, but there would be some things that would always be the same.

It'd be nice to do alot of that stuff - for units, buildings, and loads of xml stuff - from just one window rather than a dozen (or two dozen, if you're copying from another mod), and without worrying so much about typos and forgetting to close tags.
 
From my limited looks at WoW mods I think they're all UI mods too, right?

Does this mean we're going to see some awesome UI mods for Civ5? I and many others thought BUG was a great mod but many players who prioritised speed could not bear to play using BUG because it added a non-negligible amount of slowdown, presumably because of the python interpreter. (EmperorFool can correct me if I'm horribly wrong!)

If WoW did anything right, it was providing a comprehensive API and events for modders. I even wrote a prototype for Rogue-like; maybe I can port it over to civ5 ;)
 
Back
Top Bottom