Conversation
lua: update lua apis lua(refactor): apis
0225484 to
1ba73fd
Compare
…doesn't have .lua
|
I need to look into this. I do think this would get a bit more use of it was possible to convert to/from the current event editor ui to the lua scripting. I think it's possible to convert from the editor to lua, but I'm not sure about the other way around as lua provides way more features that the editor can handle... |
|
No rush with the review of this PR. Even though it’s quite large, there aren’t many logic changes -apart from integrating the external Lua library and adding the API layer between C and Lua. The Lua state (including the script) is stored inside the save game. Regarding the feature itself, I see Lua as an extension of the existing scenario events system. I don’t expect scenario designers to switch from events to Lua anytime soon. Still, Lua feels like the right step toward more dynamic scenarios in the future. It also opens the door to modding -for example, creating custom mechanics or introducing features like an emperor with a dynamic personality or a more dynamic Empire map. |
This PR initializes Lua integration, giving scenario creators more flexibility when building custom scenarios.
To add scripting to a scenario, simply create a
.luafile with the same name as the scenario file and place it in the same folder. The game will automatically load and execute the script.This PR includes a test script (
Valentia.lua). To try it out, place it in the same folder as C3.What's included
stdoutQuake style terminal

Choices dialog
