What's your ideal Scripting Situation?

Having used both I prefer Lua. Lua isn't at all strict about whitespace (accidentally mixing up my tabs and spaces were a annoying issue for me :p); its tables are a lot more flexible than Python's lists or dicts being essentially a combination of both and syntaxwise, they're not much different. I can assure you a transition to Lua will be almost painless: I didn't have much issue moving over to Python, I just prefer how freeform Lua feels in comparison.

As a novice to coding in general, this is what really sold me on javascript/LUA. Tracking whitespace is just too difficult for me to do while trying to learn what everything else does.
 
Python. Because it's Python.

I totally understand how tracking whitespace is pretty crazy and intimidating, especially when the game yells at you for missing a space somewhere. But when you get used to it, it's more elegant and extremely powerful.

I feel that I could script mods in half the time if I used Python vs. Lua.

That said, Python IS punishing on the learning curve and so I don't necessarily want it unless Firaxis gives us a way to get errors, fix them, refresh, and continue all without leaving a single session of the game. A modding debug/console mode.
 
I'd prefer Python since I know it well, and already use it to mod Civ4. It's fussiness over whitespace is not a drawback, it teaches you good coding habits. That said, I don't mind learning LUA or something else so long as the API is extensive and the available events/hooks are much more comprehensive than they have been thus far.
 
Python. Because Lua looks like hogwash to me.

On a serious note if I actually took the time to learn Lua I probably would like it.
 
I personally hate Python, but I guess I do know a little bit of it...

Ideally, it would still be SQL and Lua, although I'd be happy to learn a new language for CiVI.

As long as Jifford does it first
 
My hope is some creates an app similar to how Siri works, that I can just tell it what I want and it creates the necessary computer gobble-d-:) :) :) :):) :) :) :):) :) :) :):) :) :) :)

.....:please:


......:joke:

Edit; Hmm! see what happens, all them similes from typing "g o o k" no spaces.

..... the code is mocking me:dunno:
 
I don't get all the python hate. It is often taught as an introductory language due to ease of use. There is no colon system like in java, and the forced white-space forces you to code neatly. The compiler usually detects white-space errors anyways. Plus python has a lot of things built in that java does not, timers and string variables are two such examples.

It's funny you mention the Siri thing because I took a programming course, finished early, and ended up spending the majority of the time working on a chatbot that talked to you like Mr. T would.

Example:
You: I love white rice with anchovies.
Chatbot: I pity the fool who love white rice with anchovies

This chatbot had to be one of the defining moments in my life.
 
Simple editors like Notepad++ (free) and more complex IDEs like PyCharm (free community edition) take care of the whitespace for you. It sounds weird at first, and I snubbed it when it first came out, but it's just not a problem with a decent editor.

I suspect they'll stick with Lua but would be happy with either. I seriously doubt they'll switch to JavaScript as that would introduce the same speed issues Python had due to being highly dynamic at runtime.

The most important thing for me is a fast startup time. When I was working on BUG, I could make a change, double-click my testing saved game, and see my changes in the game in five seconds. Literally, no exaggeration. Quit, change, launch, rinse, repeat.

Loading a mod and saved game in CivV takes at least two full minutes, and I can't even walk away and let the computer do it unattended. I have to wait for the game to launch, choose the mod, wait for the mod to load, select the saved game—and finally—wait for the saved game to load. I think two minutes is being generous, and I have a more powerful machine than I had for CivIV.
 
Lua or Python is fine by me, I can learn both.

What I absolutely need is better debugging. Reloading the game, mods, etc. just to test is maddening. Editing on the fly, or an "apply changes" button is absolutely crucial to speed up development.
 
What I absolutely need is better debugging. Reloading the game, mods, etc. just to test is maddening.

This is precisely what I'm talking about with Civ4 vs. Civ5, 5 seconds vs. 3 minutes. I've timed it now, and Civ5 requires 3 user interactions to get to a saved test game:

  • Launch, wait 2m10s.
  • Click Mods, wait 37s.
  • Click Load Game and select it, wait 27s.
  • Test

For Civ4:

  • Double-click saved game, wait 5s.
  • Test

Looking at the complexity of the UI changes for CPP, I wonder if perhaps I just missed some way to reload the Lua code while the game is still running. That won't work for mods with SQL/XML changes I don't think, though.
 
Well, I never got into Civ5 modding as much as I did Civ4, but I've used Lua in other projects and honestly, I'd be happy with either one. Lua with Civ4's hot-swapping and robust API would be my ideal, plus C++ access on day one, of course.

What still bugs me in both Civ4 and 5, though, is XML. There's so much boilerplate that gets in the way of what should be simple data, and it makes combining files a pain. Using SQL as an intermediary helps a bit, but I think the devs should consider using JSON or YAML instead.
 
I hope that, whatever it is, it's accessible to people with the programming ability of the rear end of a deceased hamster. Because that's what I seem to have at the moment.
 
I hope it's simple enough to understand at the basic levels, and modular and powerful enough to do the insane things I want at the higher levels.

And as long as I'm making insane wishes, I want a pony and my own nation.

Edit: Something like Minecraft's Skript would be great, if unlikely; i.e. something like this would operate as described:

If a Nanoswarm Factory is within three tiles of any tile that isn't a Nanoswarm tile, and that tile is adjacent to one Nanoswarm tile, there is a 10% chance every turn that that tile will be converted to a Nanoswarm tile. If that tile is adjacent to two Nanoswarms, the chance is reduced to 4%. If it is adjacent to three Nanoswarms, the chance is 2%.

If a Nanoswarm tile does not have a Nanoswarm Factory within two tiles of it, there is a 25% chance every turn that a new Nanoswarm Factory will spawn on it.
 
Last edited:
I not sure if any of you played AoE2 but there was a mod tool that made modding as easy as one click of a button.

My hope it they add a program like that one. But it is simple and easy to use and understand. Really can change anything with ease
 
I not sure if any of you played AoE2 but there was a mod tool that made modding as easy as one click of a button.

My hope it they add a program like that one. But it is simple and easy to use and understand. Really can change anything with ease

Civ3 had a tool like that too, but they're little more than a UI for changing XML/SQL values and are thus very limited. Not the same thing as what's being discussed in this thread, which is scripting languages like Python or LUA. These allow much greater modding potential.

For example: If you added a new civilization, a mod editor UI would allow you to give them a Unique Ability that already exists. But to create an entirely new Unique Ability requires a scripting language (or access to the DLL).
 
Give us official documentation - that's #1, which was severely lacking, IMO, expecially for Civ:BE, and somewhat lacking even for Civ 5. Looking at the XML for civs/factions was a little helpful, and some of those property/column names are not exactly obvious to what they actually do. But my biggest pet peeve is the incomplete API, especially game events for us to handle. I'd like to know what they are, what parameters are passed to those events, and when in the game lifecycle they're invoked. From attempting to mod Civ:BE, I have salvaged (after a lot of sweat and blood) only a few working events. I know that there is some guesswork to do in developing anything, but requiring us to guess object, function, and property names is unacceptable.

And yes, make us be able to Mod in C# with Visual Studio, so provide a library with all the objects, properties, and function, so that we'll get Intellisense!
 
  • Like
Reactions: mnf
And yes, make us be able to Mod in C# with Visual Studio, so provide a library with all the objects, properties, and function, so that we'll get Intellisense!

Ugh. As an alternative to C++, maybe, but compiled languages and scripting do not mix. It's one of the reasons I've started to dislike Unity after working in it for about a year.
 
Back
Top Bottom