Hi guys,
as you can see I'm new here. First of all sorry for bad english maybe...
Iam learning the map.yaml Syntax and LUA to create my own camapaign of your brilliant remake of C&C Tiberian Dawn. I often read your explanations on your GitHub Website but its not up to date so Iam confused because I dont know which things i tried are wrong in my code. I often took the code from your expamles like gdi01,nod01... and so on but there are differences. I saw that implemented gdi01.lua and nod01.lua are not in the same folder anymore as described and as they shoud but scripting works, how could that be?
My plan was just to built step by step, so i could find yout which changes cause problems...
So I have a map which is called mission01 with map.yaml and with mission.lua. The problem that the map doesnt load is solved but now the problem is:
if buildings and infantry of GDI are destroyed or the nod rmbo dies, THE GAME PAUSES. Its not ending like your campaings or the multyplayer maps that there can switched the viewes of the players.
Nothing happens but the Game pauses, why is that happening?
This is the first thing i want to solve, that my map starts and ends correctly, can you help me? I tried different things but nothing helped and as long as there is no full documnettaion with examples that are up to date, i don't know where to ask else.
I hope you understand what i mean ;-) Thanks for help!
My own missions / Basics of LUA scripting
My own missions / Basics of LUA scripting
- Attachments
-
- mission01.oramap
- (5.11 KiB) Downloaded 482 times
Re: My own missions / Basics of LUA scripting
What do you mean by this?I often took the code from your expamles like gdi01,nod01... and so on but there are differences. I saw that implemented gdi01.lua and nod01.lua are not in the same folder anymore as described and as they shoud but scripting works, how could that be?
The Mission.MissionOver function will pause the game. This is called by mission scripts when the mission is won/lost.if buildings and infantry of GDI are destroyed or the nod rmbo dies, THE GAME PAUSES. Its not ending like your campaings or the multyplayer maps that there can switched the viewes of the players.
Nothing happens but the Game pauses, why is that happening?
Hi and thank you very much for your Reply!
I mean that I often read and used Code from your examples but I didn't understand the following:
Here on the Site it is said:
"Lua script code is to be contained in one or more .lua files within the map archive, next to map.yaml and map.bin. All script files for a particular map must be within the map's archive"
but if i unpack the .oramap from gdi01 and nod01 (from the current release) there aren't any .lua files, so how does these two lua-scripts work without the lua-file in the folder?
So that it is how it should be? If a mission is won/lost the game have to be paused? I#m just confused becaused if I play a Conquest, the game doesn't pause.
I mean that I often read and used Code from your examples but I didn't understand the following:
Here on the Site it is said:
"Lua script code is to be contained in one or more .lua files within the map archive, next to map.yaml and map.bin. All script files for a particular map must be within the map's archive"
but if i unpack the .oramap from gdi01 and nod01 (from the current release) there aren't any .lua files, so how does these two lua-scripts work without the lua-file in the folder?
So that it is how it should be? If a mission is won/lost the game have to be paused? I#m just confused becaused if I play a Conquest, the game doesn't pause.
The C&C missions and most of the RA missions in the current release are not Lua-powered. They rely on hardcoded scripts within the game itself. They have since been ported to Lua, and you'll notice this when we release the upcoming playtest.
RA's allies-01-classic and allies-02-classic are Lua-powered, and you should find .lua files in those folders.
Regular Conquest mode maps don't pause because the Conquest victory/loss code does its own thing, and it's not Lua-powered.
RA's allies-01-classic and allies-02-classic are Lua-powered, and you should find .lua files in those folders.
Regular Conquest mode maps don't pause because the Conquest victory/loss code does its own thing, and it's not Lua-powered.
Thanks again and sorry for the late reply. I tried much things and currently Iam working on my second mission :-) I found out how to:Scott_NZ wrote: ↑The C&C missions and most of the RA missions in the current release are not Lua-powered. They rely on hardcoded scripts within the game itself. They have since been ported to Lua, and you'll notice this when we release the upcoming playtest.
RA's allies-01-classic and allies-02-classic are Lua-powered, and you should find .lua files in those folders.
Regular Conquest mode maps don't pause because the Conquest victory/loss code does its own thing, and it's not Lua-powered.
- reinforce over sea/land by waypoints
- win/loose if a special building is destroyed
- add a Patrol
- spawn units in an interval and stop spawning if the weapons factory or the barracks are destroyed...
- attacks by these units
- many more by practice and many many tries ;-)
so i have a few questions to complete my second mission:
How can i force the enemy (the .lua enamy) to build units inside their factory or barracks (and also use their money on this way).
Actually i only can implement that only by spawning on a waypoint in front of the building without animations (like the NOD plane of the factory gate)...
How can i force the enemy to built and repair a buidling like a defense tower? Its not easy to unterstand the lua-files in mods/common/lua for me without a decription
is it possible to deactivate the ability to build BRIKS or SANDBAGS, and do deactivate the activation of air support by building the hq? Exceptions say that "BRIK: -buildable" is not allowed...
Thank you very much

- Attachments
-
- mission01.oramap
- (6.65 KiB) Downloaded 516 times
Strange, -Buildable: should work https://github.com/OpenRA/OpenRA/blob/b ... .yaml#L467 otherwise try Buildable: Owner: None to workaround https://github.com/OpenRA/OpenRA/blob/b ... .yaml#L645
Next version will have repair building support via scripts https://github.com/OpenRA/OpenRA/blob/b ... r.lua#L153, but I have not tested it myself so I could not write documentation at https://github.com/OpenRA/OpenRA/wiki/Map-scripting