Mission Editor - Page 6

Mission Editor

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
DavetheBrave
Posts: 281
Joined: 22 Jun 2005, 02:52

Re: Mission Editor

Post by DavetheBrave »

CarRepairer wrote:Request: Allow me to move the triggers up/down just like you can with conditions and actions. After making a bunch of triggers they start to get numerous and I want to re-order them. I am aware that this has no effect on the mission itself, it's just for organizational purposes.
totally already requested this. I win.
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Re: Mission Editor

Post by quantum »

Done!
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Mission Editor

Post by Argh »

Been working it. Took me a minute, to get to run without bugs. Basically I just have to use the core + content.

Why does it need content past the Buildpics, though? Not that that matters much, just asking.

I really, really, really, really need a Transfer / Capture event trigger condition. P.U.R.E. is all about capturing stuff, so it comes up a lot. I'm faking it with timers right now, but it's not ideal, and I had to hack out your Lua that basically established funky rules for that.

And I'd like to play a sound that's tied to a GUI event, as well. I guess I can play a sound then immediately trigger a pause, but it just seems like it would be more natural.

And new Triggers should be disabled by default, imo. And Triggers need more obvious visual signs as to whether they're disabled or not when editing. And I think that when we make a new Trigger, it should automatically give it a new, unique name, and put a dialog box in front of us asking us what we want to call it.

And last but certainly not least, I'd like some way to fork things a bit, or add a random number generator. Then missions wouldn't be so linear. Just a thought, I know that writing a UI for showing the interrelationships wouldn't be fun.

All of this is quibbling, though. Once I figured it out... man, making missions is so easy, it's ridiculous. I already have a basic training mission with full walk-me-through-everything stuff made, complete with nice UI, to get newbies into the basic concepts really quick. It's great. Totally awesome experience thus far.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Mission Editor

Post by Argh »

Oh, and don't forget to incorporate those files I sent you, and give people the option of building a "stealthed" mission :-)
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Re: Mission Editor

Post by quantum »

I haven't tried those yet, but you don't need to wait for me. You can put them in the MissionBase folder. Everything there will go in the mission mutator. It's sort of like the mission sdd.
Been working it. Took me a minute, to get to run without bugs.
What bugs did you have?
Why does it need content past the Buildpics, though? Not that that matters much, just asking.
It uses the same unit definition parser as Spring to get the unit names and the buildpics, and that one reads everything.
And new Triggers should be disabled by default, imo.
That would be inconvenient and confusing, imo. Most triggers need to be active, in my experience.
And Triggers need more obvious visual signs as to whether they're disabled or not when editing. And I think that when we make a new Trigger, it should automatically give it a new, unique name, and put a dialog box in front of us asking us what we want to call it.
Good suggestions.

And I'd like to play a sound that's tied to a GUI event, as well.
What kind of event?
And last but certainly not least, I'd like some way to fork things a bit, or add a random number generator.
Triggers have a probability field in their settings. Is that what you are looking for?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Mission Editor

Post by Argh »

What bugs did you have?
Mainly the stupid kind that come from trying to combine three different collections of Units and Weapons into one huge pile. I can't really say where things went wrong yet, but trying to integrate everything from World Builder leads to borks (although the missions work just fine on World Builder maps, so it's something else). I'd chalk 90% of it to User Stupidity, I'm in a real hurry here.
I haven't tried those yet, but you don't need to wait for me.
I didn't- I figured that part out, and it works.
What kind of event?
Graphics box. I.E., render of a character, voiceover sort've thing. Hard to sell a story without sound.
Triggers have a probability field in their settings. Is that what you are looking for?
I'm looking for a AND / OR switch.

And besides Capture, I really need a way to quickly set up a custom Command. I.E., I have lots of custom Commands for special moves and stuff, I'd like to be able to activate them more easily. I'll just sort that out with some careful Group planning for now.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Mission Editor

Post by CarRepairer »

How do I set up springie to host a mission? When I click in the mods dropdown I don't see missions, I just see every mod ever made.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Mission Editor

Post by Argh »

Ok, on Friday, hit several issues:

1. Wrote an entire Mission, had to scrap it and start over, because Trigger activation failed. The Trigger table came up nil. Since I've been using Trigger activation to start new events... um, I guess I should use another method, maybe counters instead? The mission wasn't anything fancy, and I ended up making it entirely time-driven, because of the problems I encountered.

2. Something in the Mission Lua's causing console error spam with a script I use to make new Units- it says there's recursion in CreateUnit. Probably something I'll have to figure out a way to deal with. I don't suppose that the Mission Builder could let me construct and change the value of global variables that I could use elsewhere in my game's structure?

3. How do I issue orders to Factories to build things?

4. How do I change the direction Units face when built?

5. Is there any possible way for me to put a World Builder script into this, so that I can see where all of my buildings are, etc.? If you're interested in that, I'll be more than happy to send you a sample. They're extremely simple though, it's mainly just parsing a file.
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Re: Mission Editor

Post by quantum »

1. Wrote an entire Mission, had to scrap it and start over, because Trigger activation failed. The Trigger table came up nil. Since I've been using Trigger activation to start new event
"Enable Triggers" just make triggers not disabled. Their conditions still need to be met. "Execute Triggers", instead, skips the conditions and directly runs the actions in the trigger. Which trigger table are you referring to?
Something in the Mission Lua's causing console error spam with a script I use to make new Units- it says there's recursion in CreateUnit.
This is caused by using unsafe mode. You should move your CreateUnit calls to GameFrame, or some units won't be able to be created with Lua.
How do I issue orders to Factories to build things?
You can't, currently, unless you do it in a custom action.
How do I change the direction Units face when built?
When spawned you mean? You can grab the little triangle on top of the units and drag it around. Buildings are snapped to cardinal directions, in-game.
Is there any possible way for me to put a World Builder script into this, so that I can see where all of my buildings are, etc.? If you're interested in that, I'll be more than happy to send you a sample.
Yeah send it, I'll check it out.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Mission Editor

Post by Argh »

This is caused by using unsafe mode. You should move your CreateUnit calls to GameFrame, or some units won't be able to be created with Lua.
I think I'll follow Lurker's suggestion, and just quit using unsafe mode except when I need it to create things. Will that resolve this?
You can't, currently, unless you do it in a custom action.
Okie doke, I'll start messing with that.

And I'll send you a World Builder output right away. I'm thinking that I can probably run a custom Action.
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Re: Mission Editor

Post by quantum »

I think I'll follow Lurker's suggestion, and just quit using unsafe mode except when I need it to create things. Will that resolve this?
You acutally need to stop using unsafe mode just when creating things, in this case :P But you're never forced to use unsafe mode. Just save functions in a table and executed them in gadget:GameFrame. That should solve it.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Mission Editor

Post by CarRepairer »

quantum wrote:Just save functions in a table
But not as the keys!
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Mission Editor

Post by lurker »

Why would you use unique functions? I guess you could... really ugly way though...
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Mission Editor

Post by CarRepairer »

Wasn't this the cause of the great jumpjet desync of '08?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Mission Editor

Post by Argh »

Ok... let's put it another way. What, exactly, cannot be done without unsafe mode?

I mean... I just removed that stuff from the current build, and thus far, everything is still working. I'd like to know what issues I should be checking out. MoveCtrl? Setting resources, unit health, weapon states, shield states, changing available UI controls?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Mission Editor

Post by Argh »

Ok, I have part of the answer to my question. After removing all unsafe changes invocations, I've discovered something ugly.

Basically, it can't work that way without borking a lot of things. I have a lot of functions that require a valid UnitID immediately, and they can't operate unless I create the Unit. There's no way in hell I'm going to store all that stuff in a table somewhere to be looked at during the next GameFrame update, that's going to entail a massive re-write of the gamecode.

So, instead, I'm just going to make stuff that happens during the first gameframe operate that way, to make it safe and prevent that error spam.
User avatar
kburts
Posts: 134
Joined: 22 Mar 2009, 00:36

Re: Mission Editor

Post by kburts »

is there any way i can use this with ubuntu?!
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Mission Editor

Post by Tobi »

Argh wrote:Basically, it can't work that way without borking a lot of things. I have a lot of functions that require a valid UnitID immediately, and they can't operate unless I create the Unit. There's no way in hell I'm going to store all that stuff in a table somewhere to be looked at during the next GameFrame update, that's going to entail a massive re-write of the gamecode.
Why is that a problem?

Framework:

Code: Select all

local delayedCalls = {}
local function DelayedCall(fun)
  delayedCalls[#delayedCalls+1] = fun
end

function gadget:GameFrame()
  for i=1,#delayedCalls do
    local fun = delayedCalls[i]
    fun()
  end
  delayedCalls = {}
end
Use (example):

Code: Select all

function gadget:UnitCreated(unitID, unitDefID, unitTeam, builderID)
  if (some condition) then
    DelayedCall(function()
      local newUnit = Spring.CreateUnit(...)
      -- do stuff with newUnit
    end)
  end
end
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Re: Mission Editor

Post by quantum »

Argh wrote:Ok... let's put it another way. What, exactly, cannot be done without unsafe mode?

I mean... I just removed that stuff from the current build, and thus far, everything is still working. I'd like to know what issues I should be checking out. MoveCtrl? Setting resources, unit health, weapon states, shield states, changing available UI controls?

Code: Select all

AllowUnsafeChanges("USE AT YOUR OWN PERIL")
--  Allows the use of the following call-outs when
--  not in the GameFrame() or GotChatMsg() call-ins:
--
--    CreateUnit()
--    DestroyUnit()
--    TransferUnit()
--    CreateFeature()
--    DestroyFeature()
--    TransferFeature()
--    GiveOrderToUnit()
--    GiveOrderToUnitMap()
--    GiveOrderToUnitArray()
--    GiveOrderArrayToUnitMap()
--    GiveOrderArrayToUnitArray()
--
is there any way i can use this with ubuntu?!
No way. Sorry.

The GUI framework that allowed it to be made in an affordable timeframe for me is not available on Linux. And even if it were, expecting that someone would keep up with the project and fix any problem that I cause in the Linux version is probably too much.

It doesn't even work in Windows 64bit by any reasonable standard. You need to start it dozens of times, until it doesn't crash when it loads the mission.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Mission Editor

Post by CarRepairer »

quantum wrote:It doesn't even work in Windows 64bit by any reasonable standard. You need to start it dozens of times, until it doesn't crash when it loads the mission.
I have the Vista64 startup problems. But to be fair, once it's up and running it works great! I just get past the initial frustration phase (trying to start it up approx 40 times, sometimes trying the reboot, all the while it gives the unitsync.dll error) and when it suddenly starts up, it's up for good. So I just leave it running as long as my computer is on even when not using it :)
Post Reply

Return to “Game Development”