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

0 Members and 1 Guest are viewing this topic.

raincloud

  • Guest
Re: Level design demystification / scripting guide
« Reply #15 on: March 04, 2009, 06:08:13 AM »
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, 06:42:00 AM »
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, 08:20:44 AM »
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, 08:31:15 AM by smokinjoe18 »

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 13
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #18 on: March 04, 2009, 08:57:58 AM »
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, 02: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: 13
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #20 on: March 10, 2009, 01: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, 03: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, 03: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 11, 2009, 10:22:39 PM »
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: 13
  • Posts: 1,035
Re: Couple of Questions
« Reply #24 on: March 12, 2009, 10:56:42 AM »
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 13, 2009, 08:23:12 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?

raincloud

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

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 13
  • Posts: 1,035
Re: levels I want to build
« Reply #27 on: March 15, 2009, 11:33:58 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?
Sadly we don't have enough functionality to do this at the moment. Sorry.

Unre9istered

  • Guest
question about grace stat
« Reply #28 on: March 17, 2009, 08:28:56 PM »
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: 13
  • Posts: 1,035
Re: Level design demystification / scripting guide
« Reply #29 on: March 19, 2009, 10:45:46 AM »
Examine the XML for level 3, which has a team with a grace period set. If it's still not working, let me know.