Author Topic: Level design demystification / scripting guide - XML  (Read 39597 times)

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Level design demystification / scripting guide - XML
« on: December 08, 2008, 05:21:01 AM »
This thread pertains to the old XML level design functionality - all still present, just completely superceded.

Here is a breakdown of the current level design abilities given to levellers :)
Currently supported tokens (some are overloaded and have the same function, just choose a word and stick with it):
  • "after", "begin":
    Followed by a number, this sets the starting time for the event. Failure to specify this results in the event being triggered as soon as the level begins. Time is measured in seconds from the start of a level.
  • "team":
    Followed by an integer number, this sets the team to which this event applies. See above (asteroid "owner") for team designations.
  • "until","before","end":
    Set the end time for the event. Set this to a negative number to have the event continue forever. I am unsure what happens if the number is positive but before the starting time; if it doesn't do so already, this ought to cause the event to be a one-shot event. I will fix this if it isn't the case.
  • "every":
    Sets the frequency of the event for the duration for which it is active. The value is measured in seconds and may contain a decimal point. The event will trigger every X seconds after the start time and it will do this until the end time is reached.
  • "spawnseedling","spawnseedlings":
    These set the event type to spawn a seedling from a random Dyson tree in the empire of the given team.
[/li]
[li]Conditions
These are pretty complicated already. The conditions set winning and losing conditions for the game. They are designated by the tags "win" and "lose" and have one attribute, "if", which contains a script that tells the game about the condition.
Conditions have a source team, a target team, a noun, a verb, and a comparison.
Currently supported tokens:
  • "team":
    If we already parsed the verb, this will refer to the target team. Otherwise it refers to the source team. It must be followed by a team number, which is the same designation as the above team designations.
  • "owns", "own":
    (Verb) Sets the condition to be about posession. It just means "in the empire at the current time". You can set the condition to test if the team owns a certain number of trees, seedlings, or asteroids. You could set it so the player has to acquire a certain number of asteroids, trees, seedlings, or a specific asteroid (e.g. "team 1 owns asteroid 1) for instance. If you specify a number after this, the comparison is set to "exactly" by default (e.g. "team 1 owns 5 asteroids"). Otherwise, you may want to specify your own comparison or a specific entity in the game.
  • "destroy", "destroys", "destroyed", "defeated":
    (Verb) Destruction. This isn't fully implemented as we don't currently tally kills and destriction and asteroid takeover. Essentially this only works against teams at the moment (e.g. "team 1 defeated team 2"). You can also say "team 1 defeated 2 teams" which will count up the remaining enemy AI teams and if it's 2 less than the number that started, the condition will be satisfied.
  • "create", "created", "make", "made", "plant", "planted":
    (Verb) For now, this is the same as "own". Later it will be a tally of created entities.
  • "all":
    (Comparison) Sets the comparison to be "all". The condition will test all the relevant entities. e.g. "team 1 owns all asteroids" will test all the asteroids and if the player owns them all then the condition will be satisfied.
  • "more", "morethan", "more than", ">":
    (Comparison) Sets the comparison to be "more than".
  • "less", "lessthan", "less than", "<":
    (Comparison) Sets the comparison to be "less than".
  • "teams":
    (Noun) Sets the article to be teams. e.g. "team 1 defeated more than 2 teams".
  • "asteroid":
    (Noun) A specific asteroid. Follow this with a number that specifies an asteroid. This is only really useful if you specified some particular asteroids in the level data. The asteroids will have identification numbers starting at 0 and going up by 1 for each asteroid encountered in the file. So the first asteroid you specify will be asteroid 0 and the next one will be asteorid 1 etc.
  • "asteroids":
    (Noun) A number of asteroids. Precede this with a number or "all" e.g. "team 1 owns all asteroids" or "team 2 owns 2 asteroids".
  • "trees":
    (Noun) This is a tricky one as it could refer to any or all types of tree. If you write "Dyson trees" then the game will recognise that as Dyson trees. Same for defense trees. However, if you just write "trees", and haven't written "Dyson" or "defense", then the noun will refer to either type of tree. e.g. "team 2 owns 20 trees".
  • "dyson", "dysontrees":
    (Noun) Refers to Dyson trees.
  • "defense", "defensetrees":
    (Noun) Refers to defense trees.
  • "seedlings":
    (Noun) Refers to seedlings. e.g. "team 2 owns more than 400 seedlings"
These are fairly intuitive to mix and match. Mostly you can just write what you feel. The game will be won if all win conditions are satisfied. The game is similarly lost if all lose conditions are satisfied. If you don't specify any conditions, the game defaults to having the player's team win if all other races are defeated and lose if no asteroids are owned.

[/li]
[li]Teams
Use the "empire" tag to specify a team:
Code: [Select]
 <empire team="2" grace="99000" />
    The team attribute should be self explanatory by now. The grace period refers to the period in seconds from the beginning of a level in which a team is denied the right to move seedlings around the map.[/li]
« Last Edit: October 27, 2009, 05:37:21 PM by Alex »

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #1 on: December 08, 2008, 05:38:52 AM »
OK, and if you want to debug your scripting...

WARNING: READING THIS AND ACTING ON THE CONTENTS MAY COMPLETELY RUIN THE GAME EXPERIENCE FOR YOU
or enhance it - hehe

[spoiler:mlfanmmo]Press left Ctrl and D to enter developer mode.

While in debug mode:
Press D to cycle through debug information layers. The conditions should appear in the top right. Also the game will list the log of the level parsing, so maybe you can tell what went wrong if it doesn't work.[/spoiler:mlfanmmo]

[spoiler:mlfanmmo]Not had enough yet huh? Okay.
The +/- keys on the number pad will accelerate and decelerate the passage of time in the game.[/spoiler:mlfanmmo]

[spoiler:mlfanmmo]I can see you want the whole deal. Okay.

Press F2 to open the variable directory. This contains a list of variables sorted into directories. You can change stuff here and load/save them to settings files and level files. It's usually better to edit the levels by hand. Remember to back up your stuff. You can always just reinstall the game if you want to restore defaults.

Press F3 to open the graph window. This will show you various graphs for different things in the game - it's intended to give an idea of how certain elements of the game change with respect to attributes.

Press F4 to open the debug window. This lets you turn off/on visibility of different teams, and lets you spy on entities by clicking on them with the middle mouse button. You can also deactivate the camera limit and the sending limit here.

Some windows are resizable - just drag the edges like you would in other GUIs.[/spoiler:mlfanmmo]

metarinka

  • Guest
Re: Level design demystification / scripting guide
« Reply #2 on: December 08, 2008, 01:39:11 PM »
thanks soooo much!

this gives me the motivation to kick out those remaining levels I've got stored away!

dbltnk

  • Guest
Re: Level design demystification / scripting guide
« Reply #3 on: January 09, 2009, 11:05:32 PM »
I removed the write protection both on the game folder, the ressources folder and all files in them. There level files should be editable now. Still, both edit++ and the windows editor tell me that I can't write there. Using Vista x64. Any suggestions?

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #4 on: January 10, 2009, 04:38:01 AM »
That's really odd - and I've had other people note that Dyson crashes or has other bad behaviour on Vista owing to write permission. I've not become familiar with Vista so I don't know where it's appropriate for games to store their data. I'll look it up. Thanks for the info.

dbltnk

  • Guest
Re: Level design demystification / scripting guide
« Reply #5 on: January 10, 2009, 05:39:02 AM »
Somehow the write protection on the folder doesn't get removed, even if Vista says so. I can save the edited level file in another spot with no problems. Maybe you should just get rid of that write protection for your next release.

crazeh.monkeh

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 53
Re: Level design demystification / scripting guide
« Reply #6 on: January 10, 2009, 12:28:17 PM »
Quote from: "dbltnk"
I removed the write protection both on the game folder, the ressources folder and all files in them. There level files should be editable now. Still, both edit++ and the windows editor tell me that I can't write there. Using Vista x64. Any suggestions?

Hey, I'm running Vista too. It crashes for me sometimes if it is saved in the C: drive (where most apps get installed) because it tries to write or modify files inside of it's folder, and vista won't let it. Alex had me move the folder to my desktop and that fixed it, but your documents folder should be fine, too. I just installed mine on a thumb drive and it is fine. I can even edit levels and everything.

On a side note, I think if you set the planet to static the planet starts exactly there, but the swarm and trees don't. They start slightly off of the planet, and you have the roots of the plants growing off in space, but the trees themselves are on the planet. I THINK it is because they are on static. I could have messed something else up, but I think that is what it was. Yup. I just switched to not static and it fixed it. Idk. Maybe it just happens to me.

Anyway, Alex, you get to see my level soon, lol.

*Edit: also, is there a way to start some kind of a timer? Like "after this event, wait such and such time, them do this". I can think of a few ways that I could use it, but if not, I'll live.

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #7 on: January 11, 2009, 02:44:18 AM »
Quote from: "crazeh.monkeh"
Quote from: "dbltnk"
I removed the write protection both on the game folder, the ressources folder and all files in them. There level files should be editable now. Still, both edit++ and the windows editor tell me that I can't write there. Using Vista x64. Any suggestions?

Hey, I'm running Vista too. It crashes for me sometimes if it is saved in the C: drive (where most apps get installed) because it tries to write or modify files inside of it's folder, and vista won't let it. Alex had me move the folder to my desktop and that fixed it, but your documents folder should be fine, too. I just installed mine on a thumb drive and it is fine. I can even edit levels and everything.

On a side note, I think if you set the planet to static the planet starts exactly there, but the swarm and trees don't. They start slightly off of the planet, and you have the roots of the plants growing off in space, but the trees themselves are on the planet. I THINK it is because they are on static. I could have messed something else up, but I think that is what it was. Yup. I just switched to not static and it fixed it. Idk. Maybe it just happens to me.

Anyway, Alex, you get to see my level soon, lol.

*Edit: also, is there a way to start some kind of a timer? Like "after this event, wait such and such time, them do this". I can think of a few ways that I could use it, but if not, I'll live.
That sounds like a pretty serious bug - I didn't know that was happening. Could you email me the XML of the file that's showing that happen? Cheers!

There are timers in there, but their only current function is to start spawning seedlings at random. Hopefully we'll expand on this as we add new stuff and get level editing more integral.

ccjav

  • Guest
Re: Level design demystification / scripting guide
« Reply #8 on: January 11, 2009, 06:17:57 AM »
Ya im also running this on vista, and having the write problem... the main issue for me is when you try to change the options and hit done, it crashes the game. A way to get around the fact you cant save scripts than save them, save them somewhere else (desktop perhaps?) and then drag and drop the file to replace it.

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #9 on: January 11, 2009, 03:31:59 PM »
Vista sounds like it sucks :D

OK, will have to fix this. Cheers guys.

sfericz

  • Guest
Re: Level design demystification / scripting guide
« Reply #10 on: January 11, 2009, 04:44:14 PM »
First, let me say congrats on the IGF submission! I have only played one level and I can say it is well deserved. I also want to thank the developers for this unique game. Having the ability to create community member levels will keep this game alive for awhile I believe.

This thread is a great resource, thanks! Once I get to finish the game :P

I'm glad I found this community before you guys hit big (because you will) I find the best resources to a game can be found in the community members. In example.... metarinka has already made seven new levels?? wOw... People like that are great to have with a new gaming company.

Quote from: "Alex"
Vista sounds like it sucks :D

OK, will have to fix this. Cheers guys.
I will try to reproduce these errors on my vista O/S....I have only been able to reproduce the (Start-up, Maximizing before loading elements) bug. But I think I read where you know what causes that already.

I think these errors might have something to do with the UAC on Vista, I have mine (plus a lot of other stuff) turned off and can not reproduce the Write to folder/file error.

wogan

  • Guest
Re: Level design demystification / scripting guide
« Reply #11 on: February 14, 2009, 08:39:15 AM »
Yeah, Vista. Lovely OS.

You can solve all those write problems by running the game as Administrator (right-click the executable). This means that you'll have to explicity launch it this way every time you run Dyson, which isn't preferable.

But in C#:



I'm not sure what OS you're coding on, but you should be able to explicitly set IO permissions. This will require user authorization when installing on Vista, but that's preferable to having to launch as admin each time. And it shouldn't affect other OSes at all.

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #12 on: February 14, 2009, 07:30:05 PM »
Ah cheers Wogan, I didn't know about that!

What I've done currently is get the game to move the user-editable files into My Documents/Game data/Dyson (on windows only), but the jury's now out on whether that's preferable to the method you've just described.

crazeh.monkeh

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 53
Re: Level design demystification / scripting guide
« Reply #13 on: February 15, 2009, 02:45:42 AM »
I'm voting on Wogan's idea if you can get it to work. I like having all of my programs either in Program Files or on a Flash Drive (Which is what I'm doing with it now. It keeps it nice and portable. Lol)

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #14 on: February 15, 2009, 06:19:00 AM »
I'm inclined to agree, c.m!

raincloud

  • Guest
Re: Level design demystification / scripting guide
« Reply #15 on: March 04, 2009, 02:08:13 PM »
How are you guys making new levels? Is there a level editor, or is it just a matter of editing the .level files in Notepad?

topmo3

  • Helper
  • Shoot
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
Re: Level design demystification / scripting guide
« Reply #16 on: March 04, 2009, 02:42:00 PM »
Alex, can you cast light on "AI" section of .level? i mean MINTICK, MAXTICK... and may be there are other parameters.
thanx

smokinjoe18

  • Guest
Re: Level design demystification / scripting guide
« Reply #17 on: March 04, 2009, 04:20:44 PM »
Could you also shed light on the min/max figures you can input as i noticed when you set the cost for a tree to 30 for eg the seedlings disappear but you dont get the dyson tree ending up with no seedlings and no trees ....

So some of the settings people are putting in might be having a negative affect ???
« Last Edit: March 04, 2009, 04:31:15 PM by smokinjoe18 »

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #18 on: March 04, 2009, 04:57:58 PM »
How are you guys making new levels? Is there a level editor, or is it just a matter of editing the .level files in Notepad?

At the moment yes - we're planning an editor though.

Alex, can you cast light on "AI" section of .level? i mean MINTICK, MAXTICK... and may be there are other parameters.
thanx

Min and max tick affect how often the AI makes decisions. If you reduce these to something quite small, in thoery the game should get more difficult. Make them big to make the AI very slow to 'think'. Not that it really thinks that hard at all.

Could you also shed light on the min/max figures you can input as i noticed when you set the cost for a tree to 30 for eg the seedlings disappear but you dont get the dyson tree ending up with no seedlings and no trees ....

So some of the settings people are putting in might be having a negative affect ???

That sounds like a bug to me. I'll check it out. Cheers. But yes - editing these level files could easily break the game when you play them, so you will currently need to thoroughly test your levels! :)

raincloud

  • Guest
Re: Level design demystification / scripting guide
« Reply #19 on: March 07, 2009, 10:14:57 AM »
Is there a way to set how big the attack radius is for a particular asteroid? I'm messing around with these levels in Notepad, and I've figured out how to put asteroids in particular places, and I know how to change the energy, strength, and speed of the seedlings they produce, but I don't know how to choose the farthest possible distance that seedlings can be sent from an asteroid.

For example, I could make a large asteroid with strong seedlings, but maybe I want those seedlings to only be able to travel a short distance. (it might be difficult to escape the strong gravity of a big asteroid, after all.)

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #20 on: March 10, 2009, 08:33:08 PM »
This is a function of a number of variables.

There is a minimum asteroid size. The additional radius for an asteroid is the sum of each of the products of each attribute with the size boost given for that attribute. This is then fed through a power rule to give the final size for an asteroid.

so it's (IIRC):

added radius = strength * size from strength + speed * size from speed + energy * size from energy

proportion of max radius = added radius / (size from strength + size from speed + size from health)

asteroid radius = minimum radius + power(proportion, asteroid radius power value) * added radius

Unre9istered

  • Guest
Couple of Questions
« Reply #21 on: March 11, 2009, 10:20:14 PM »
Is it possible to make set all of the asteroids stats somehow?  I want to make a level where all of the planets produce fast seedlings, (mostly out of impatience).  I've tried changing the "minspeed" stat but that seems to cause an error. 

Also, is there a way to make more of the neutral asteroids have the gray (team 0) units on them?  I want to make a harder level where all the asteroids are defended.

Unre9istered

  • Guest
Another Question
« Reply #22 on: March 11, 2009, 10:23:41 PM »
One more question:  Is there a reason the AI teams have no limit on how far their seeds can travel?  It's really annoying to have to defend asteroids that are 6 asteroids away from my borders...

raincloud

  • Guest
Re: Level design demystification / scripting guide
« Reply #23 on: March 12, 2009, 05:22:39 AM »
Wow, that's really complicated, why didn't the developers just set up a function where you could set attack radius to 1000 or 500 or whatever you want? It seems so unintuitive to choose attack radii in such a complex way.

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Couple of Questions
« Reply #24 on: March 12, 2009, 05:56:42 PM »
Is it possible to make set all of the asteroids stats somehow?  I want to make a level where all of the planets produce fast seedlings, (mostly out of impatience).  I've tried changing the "minspeed" stat but that seems to cause an error. 
At the moment the stats are equally randomly generated. You can set individual asteroid stats in a level:
Code: [Select]
<asteroid pos="-2500,0" attribs="0.7,0.2,0.3" owner="2" trees="3,1" seedlings="40" static="false"/>change the attribs field.

Also, is there a way to make more of the neutral asteroids have the gray (team 0) units on them?  I want to make a harder level where all the asteroids are defended.
You can do this procedurally by modifying the following variables:
Code: [Select]
  <dir name="GAME">
    <dir name="GREYSPROBABILITY" type="int" value="15" />
    <dir name="GREYSMIN" type="int" value="5" />
    <dir name="GREYSMAX" type="int" value="10" />
  </dir>
Probability is 0 -> 100% chance of greys being created on an asteroid at the start of the game.
min/max are limits on the number of generated enemies.

One more question:  Is there a reason the AI teams have no limit on how far their seeds can travel?  It's really annoying to have to defend asteroids that are 6 asteroids away from my borders...
The reason is that the AI teams are a filthy hack that needs rewriting.

Wow, that's really complicated, why didn't the developers just set up a function where you could set attack radius to 1000 or 500 or whatever you want? It seems so unintuitive to choose attack radii in such a complex way.
We made it like this so that there could be a difference in value between smaller and larger asteroids. I don't think it's unintuitive that larger asteroids allow you to send farther, but it does result in bugs which we do need to address. If you want to set the radius, change the following values:
Code: [Select]
  <dir name="ASTEROIDS">
    <dir name="MINSENDDISTANCE" type="int" value="1000" />
    <dir name="MAXSENDDISTANCE" type="int" value="1000" />
  </dir>
and set them to the same desired value as shown. That should work.

Unre9istered

  • Guest
levels I want to build
« Reply #25 on: March 14, 2009, 03:23:12 AM »
I'm trying to build a level where each time you take an asteroid, more seedlings are added to the remaining enemy asteroids. 
Anyone know if this is possible and if so what the scripting would be for that?

Another idea is an array of asteroids where you need to take a specific asteroid, but if you attack one of the 3 or 4 that you can reach the goal from the rest of the enemy asteroids suddenly become active rather than passive and start to attack you.  Is this possible?

raincloud

  • Guest
Re: Level design demystification / scripting guide
« Reply #26 on: March 14, 2009, 03:37:16 AM »
Thanks Alex! I will try that!

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: levels I want to build
« Reply #27 on: March 15, 2009, 06:33:58 PM »
I'm trying to build a level where each time you take an asteroid, more seedlings are added to the remaining enemy asteroids. 
Anyone know if this is possible and if so what the scripting would be for that?

Another idea is an array of asteroids where you need to take a specific asteroid, but if you attack one of the 3 or 4 that you can reach the goal from the rest of the enemy asteroids suddenly become active rather than passive and start to attack you.  Is this possible?
Sadly we don't have enough functionality to do this at the moment. Sorry.

Unre9istered

  • Guest
question about grace stat
« Reply #28 on: March 18, 2009, 03:28:56 AM »
I'm having some problems with the AI stat "GRACE".  I have a level set up where I've created a large number of asteroids with a large number of maxed out enemy seeds on them that I want to go active after a certain period of time.  I tried setting the grace stat to 1000 assuming that gave me a grace period of 1000 seconds to try and take them out.  Instead they are active almost right away.  (I've watched them with the debug mode).  I've now set the grace stat to 99000 and they are still active right away.  I've even put in the "<empire team="2" grace="99000" />" to specifically make them inactive.  Nothing seems to be working...

Any ideas?

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #29 on: March 19, 2009, 05:45:46 PM »
Examine the XML for level 3, which has a team with a grace period set. If it's still not working, let me know.

Unre9istered

  • Guest
Re: Level design demystification / scripting guide
« Reply #30 on: March 19, 2009, 10:24:02 PM »
Do you mean this line: " <empire team="2" grace="99000" />"?
I've tried it.  Do I need to specify it for every asteroid I give that team or something?

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #31 on: March 19, 2009, 10:38:47 PM »
No, should be for each team... can you post your xml in a new thread?

Unre9istered

  • Guest
Re: Level design demystification / scripting guide
« Reply #32 on: March 19, 2009, 11:08:36 PM »
By XML do you mean the text of the .level file?

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #33 on: March 20, 2009, 01:05:28 AM »
yeppers

Unre9istered

  • Guest
Re: Level design demystification / scripting guide
« Reply #34 on: March 20, 2009, 02:28:53 AM »
It's been posted here.

zero

  • Guest
Re: Level design demystification / scripting guide
« Reply #35 on: April 26, 2009, 08:16:12 PM »
ctrl (or in my case strg) + D , doesn't show me something in the upper right corner :/

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #36 on: April 27, 2009, 07:37:43 AM »
I think I changed the debug mode info button to f12. Try that. After pressing ctrl-d.

AUSisp*cry*

  • Guest
Re: Level design demystification / scripting guide
« Reply #37 on: May 09, 2009, 05:38:24 PM »
1) Is there a way to set the starting view to be of the planet that you control?

2) Is there an E.T.A. of a patch that fixes the comps ability to 'fly' beyond set range?

3) Is there some way i can change the max number of trees for all but certain planets?

4) Is  there a way i can change the cost of defense trees?

5) How would i put in the xml to add seeds to a specific planet without dyson trees every x seconds?

6) Is there a way to set it so that you can only build dyson trees?

7) Is there some way i can set it so that when you cap a asteroid, the tree that you destroyed grows back as the same tree? (e.g. i destroy a defense tree, cap the asteroid, and then have the defense tree start to grow back)

8 ) What do these things do:
     -Checktimer (missiles)
     -anything to do with volume (asteroids)
     -asteroids (game)

Thanks

   -AUSisp*cry*
« Last Edit: May 10, 2009, 01:39:07 PM by AUSisp*cry* »

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #38 on: May 11, 2009, 03:05:36 AM »
1) Is there a way to set the starting view to be of the planet that you control?

2) Is there an E.T.A. of a patch that fixes the comps ability to 'fly' beyond set range?

3) Is there some way i can change the max number of trees for all but certain planets?

4) Is  there a way i can change the cost of defense trees?

5) How would i put in the xml to add seeds to a specific planet without dyson trees every x seconds?

6) Is there a way to set it so that you can only build dyson trees?

7) Is there some way i can set it so that when you cap a asteroid, the tree that you destroyed grows back as the same tree? (e.g. i destroy a defense tree, cap the asteroid, and then have the defense tree start to grow back)

8 ) What do these things do:
     -Checktimer (missiles)
     -anything to do with volume (asteroids)
     -asteroids (game)

Thanks

   -AUSisp*cry*

1) If it doesn't, that sounds like a bug. Possibly the camera is just focusing on the first asteroid in the level file - try swapping hte player asteroid with that and see if that fixes it.

2) Not yet - It'll be fixed by the time we release though.

3) Not yet. It's on the list though.

4) Yeah. It should be in the defense structures area of your level xml or default.xml - change the cost value and it should update accordingly.

5) There is a level design feature for this at the moment, but it's not quite what you want. This doesn't work too well at the moment and is just an event for one level. It just makes seedlings pop out of a team's trees every X seconds. I don't recommend using it. We will put stuff like this in later though.

6) No, but if you were to set the cost of a defense tree to like a million seedlings, then that should do it :)

7) Not at the moment.

8) a) how often missiles check for enemies to strike.
b) There are a few sound effects in there that these control - "VOLUME" controls the maximum volume of the ambient asteroid sounds (the radio noises); "CONQUERVOLUME" controls the volume of the sound made when an asteroid is captured; "SENDVOLUME" controls the volume of the noise made when you send seedlings from one place to another.
c) This is the number of asteroids in the belt, which is usually overridden by the levels xml.

Vanger

  • Tester
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 212
Re: Level design demystification / scripting guide
« Reply #39 on: July 21, 2009, 04:50:08 AM »
Important!

Do not use "more than" or "less then". The former is always true, the latter is always false.
Use "morethan/lessthan" or "more/less" instead!

FemHeink73

  • Guest
Level design demystification / scripting guide
« Reply #40 on: October 16, 2009, 07:15:51 PM »
Thank you, I remember making my design for Eggspert and then realising later that I could have made it Champ, after seeing your design
You seem to be able to solve levels that I would deem impossible after seeing them once, I guess I need to take some tips from you

Imagamer

  • Guest
Re: Level design demystification / scripting guide
« Reply #41 on: October 23, 2009, 07:37:09 AM »
I've familiarized myself with xml levels, but as of yet, i can't find a lua level guide. Do you plan on making one soon?

Thanks

Edit: Nevermind, I discovered that you're working on it.

________

  • Guest
Re: Level design demystification / scripting guide - XML
« Reply #42 on: December 22, 2009, 09:15:58 PM »
Sorry, is there any way to spawn random asteroids with trees on them? Specifically defense trees.

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: Level design demystification / scripting guide - XML
« Reply #43 on: January 03, 2010, 01:18:42 AM »
how can I move asteroid's?

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 14
  • Posts: 1,035
Re: Level design demystification / scripting guide - XML
« Reply #44 on: January 08, 2010, 10:48:02 PM »
Moving asteroids in Lua after the setup is potentially dodgy and I've never tried it but could be pretty funny if it worked. I'd have to have a look and don't have time right now.

random asteroids with trees on is no problem ______, start a new thread and i'll post a script later

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: Level design demystification / scripting guide - XML
« Reply #45 on: January 26, 2010, 12:23:01 AM »
If there's LUA code to move asteroids, I haven't found it - and believe me I've been looking !

It does seem to be possible to change an asteroid's radius and send distance in Function Level Logic, though.  Send distance works for sure as I have this working in the level I'm working on.  Haven't tried asteroid radius yet, but with the mathematical functions included in the LUA language it should mean it's possible to create asteroids that grow and shrink over time, or depending on how many seeds or trees are on them.  The idea of having "pulsating" asteroids seems pretty cool, and not something I've seen in any levels so far.. :>
« Last Edit: January 26, 2010, 12:25:09 AM by annikk.exe »

Rudolf

  • Administrator
  • Old Oak
  • *****
  • Thank You
  • -Given: 5
  • -Receive: 13
  • Posts: 669
  • Eufloria: Yes
Re: Level design demystification / scripting guide - XML
« Reply #46 on: January 26, 2010, 05:25:25 PM »
You can also change the level bakground colour which allows you for example to slowly brighten or darken a level :-)
You could make it conditional on events and let the level colourcode how well you are doing. CRAZY TALK!!!

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: Level design demystification / scripting guide - XML
« Reply #47 on: January 26, 2010, 06:03:22 PM »
Yep, you could do a sort of day/night type thing as well.  :>
Haven't tried scripting background colour changes yet, but it's cool to know that this works !  ^_^