Autor Thema: faqs, ai scripting and other tech questions  (Gelesen 48546 mal)

0 Mitglieder und 8 Gäste betrachten dieses Thema.

Offline Botti

  • Held
  • *
  • Beiträge: 586
    • CondorRO
faqs, ai scripting and other tech questions
« Antwort #30 am: 2003-08-06, 08:50:56 »
Gut hast mich erwischt speedy, ich hab nichts verstanden :oops:
Ich wollte ihn nur nicht falsche Hoffnungen machen :o

Coyote, the best is you translate one word :wink:
And then the next word, etc.

I think it translate better :|

Greetings
  BotmanGT

(Thanks to DarkStrider!)

CondorRO Patch Client: site / topic
CondorRO Website: here.



Offline lav_coyote25

  • Veteran
  • *
  • Beiträge: 54
faqs, ai scripting and other tech questions
« Antwort #31 am: 2003-08-06, 17:43:28 »
Zitat von: BotmanGT
Gut hast mich erwischt speedy, ich hab nichts verstanden :oops:
Ich wollte ihn nur nicht falsche Hoffnungen machen :o

Coyote, the best is you translate one word :wink:
And then the next word, etc.

I think it translate better :|

Greetings
  BotmanGT


==========================================

 :lol:  yes - i thought as much - i also had a good laugh reading your comments - brightened my day...   and i will post in english - speedy will have to translate - oh - by the way - you do have a german resource on the warzone cd - at least i have on mine -  in the readme section on disk 1. there is a lot of information there that i think people miss - or dont bother with... also in the uk readme - the us and others are missing items for some reason...  anyways - hope you had a great sleep speedy...sounds like you need it. chat later.

==============================================
10:38 - august6/2003 - edmonton local time - just checked the dowloads area of the pumpkin2 site - from the looks of it - what you are after is now up.
Documents Project
http://members.shaw.ca/kgmetcalfe/
Mars Campaign site
http://groups.msn.com/wz2100mars/_whatsnew.msnw
http://wztoys.org/xoops/modules/news/

Offline speedy

  • Spezialist
  • *
  • Beiträge: 486
    • http://www.wz2100.de
faqs, ai scripting and other tech questions
« Antwort #32 am: 2003-08-07, 11:07:35 »
hi,
think I have to check this Warzone-CD1 again...
thanx, my sleep was *really* neccessary  :wink:
Do you have ICQ ?
I'm downloading these files now, thanx for the info!

to our germans:
soll ich nun übersetzen oder nicht ?? Ich versteh das alles was Lav sagt, aber *exakt* übersetzen ist doch etwas *mehr* Arbeit...
here AI . . . . . . . . .  Humans
boosted . . . . . . . . . loosing...

Offline speedy

  • Spezialist
  • *
  • Beiträge: 486
    • http://www.wz2100.de
faqs, ai scripting and other tech questions
« Antwort #33 am: 2003-08-07, 15:13:38 »
@lav_coyote
some other questions:
also I haven't much time to read all your impressive faqs, ideas and comments... I found some interesting papers about AI...
Has someone written such an AI ?? Never heard about it...
I don't think all of these ideas CAN be implement in the script language warzone supports. But I have to say I don't know all about the possibilities of this language!
Btw, do you (or other guys at pumpkin-2) plan to integrate such an AI for 1.12 final ? (or to "update" the WaterAI or TurtleAI ?)
Because for AIBoost2.0 I want to have it compatible with the final 1.12 release AND want to have the WaterAI and TurtleAI still in it. So finally someone has to make it. And if nobody cries - I will do it.
What do you think about it?
btw. - never tested it - can you take more AIs (like the SuperAI and the GhengisAI) within WZStarter - means does WZStarter recognizes that there are more choices for the AI AND makes them selectable in his AI-tab ? (so I haven't to modify these AIs for AIBoost but can double the number of AIs and have the second ones the boosted ones...)

PS. sollte das jemand nicht verstehen aber verstehen wollen, einfach posten, werde das dann übersetzen...
here AI . . . . . . . . .  Humans
boosted . . . . . . . . . loosing...

Offline lav_coyote25

  • Veteran
  • *
  • Beiträge: 54
faqs, ai scripting and other tech questions
« Antwort #34 am: 2003-08-07, 16:41:07 »
Zitat von: speedy
@lav_coyote
some other questions:
also I haven't much time to read all your impressive faqs, ideas and comments...

in regards to the faq's / ideas / comments - not all are mine - and i have given credit to the author of that item  - all i do is collect and post on the site - now if i have an idea - i will give myself credit for that idea.  if you give me a faq on something - you will receive the credit for writing that item. just making sure you understand that all the items on the site are not MINE but placed there as a resource with the permission of the author.

I found some interesting papers about AI...
Has someone written such an AI ?? Never heard about it...


which ai are you speaking of - if it is the ideas that were being discussed - no one has attempted to do that ai as of yet - it is just a discussion at this point - if it gives you an idea for an ai - then it has accomplished the task to expanding wz2100.  
I don't think all of these ideas CAN be implement in the script language warzone supports. But I have to say I don't know all about the possibilities of this language!

Btw, do you (or other guys at pumpkin-2) plan to integrate such an AI for 1.12 final ? (or to "update" the WaterAI or TurtleAI ?)
Because for AIBoost2.0 I want to have it compatible with the final 1.12 release AND want to have the WaterAI and TurtleAI still in it. So finally someone has to make it. And if nobody cries - I will do it.

why would anyone cry - if you have the talent to make an A.I. that would be that awesome as to make all that go up against it cringe in fear - then I say DO IT!  DO IT NOW!  please!  and as for compatability - i am not the one to be asking as i have not the faintest idea.  others build - i test - and when i can suggest somethig be changed - then thats what i do - if they listen - good - if they dont listen - oh well on to the next item or task.  i can only do so much in a given day - yes?


What do you think about it?
btw. - never tested it - can you take more AIs (like the SuperAI and the GhengisAI) within WZStarter - means does WZStarter recognizes that there are more choices for the AI AND makes them selectable in his AI-tab ? (so I haven't to modify these AIs for AIBoost but can double the number of AIs and have the second ones the boosted ones...)

now for warzone starter - again you will have to ask strata these questions - as i do not know - i can guess but that wouldnt help you - ask strata - - -  
PS. sollte das jemand nicht verstehen aber verstehen wollen, einfach posten, werde das dann übersetzen...
Documents Project
http://members.shaw.ca/kgmetcalfe/
Mars Campaign site
http://groups.msn.com/wz2100mars/_whatsnew.msnw
http://wztoys.org/xoops/modules/news/

Offline lav_coyote25

  • Veteran
  • *
  • Beiträge: 54
faqs, ai scripting and other tech questions
« Antwort #35 am: 2003-08-07, 16:46:45 »
Zitat von: speedy
hi,
think I have to check this Warzone-CD1 again...
thanx, my sleep was *really* neccessary  :wink:
Do you have ICQ ?
I'm downloading these files now, thanx for the info!

to our germans:
soll ich nun übersetzen oder nicht ?? Ich versteh das alles was Lav sagt, aber *exakt* übersetzen ist doch etwas *mehr* Arbeit...



yes i have icq - but not always on - i am on always msn messenger though but if you want - we could arrange a set time to do the icq...

19427427                         is my icq number.
kgmetcalfe@hotmail.com    - msn messenger
kimgmetcalfe                    - on aim
Documents Project
http://members.shaw.ca/kgmetcalfe/
Mars Campaign site
http://groups.msn.com/wz2100mars/_whatsnew.msnw
http://wztoys.org/xoops/modules/news/

Offline speedy

  • Spezialist
  • *
  • Beiträge: 486
    • http://www.wz2100.de
faqs, ai scripting and other tech questions
« Antwort #36 am: 2003-08-07, 17:04:04 »
Zitat
@lav_coyote
some other questions:
also I haven't much time to read all your impressive faqs, ideas and comments...

in regards to the faq's / ideas / comments - not all are mine - and i have given credit to the author of that item - all i do is collect and post on the site - now if i have an idea - i will give myself credit for that idea. if you give me a faq on something - you will receive the credit for writing that item. just making sure you understand that all the items on the site are not MINE but placed there as a resource with the permission of the author.


yes of course as you see...

@lav_coyote:

wow !!
a very well done compilation of FAQs and HowTo's !!



I've spoken of these ideas. But don't think I can implement any of these advanced ideas... but let's see...
And yes, I will do some (more) work for the AI as I've done before making the AIBoost-MOD. But it is with all work done by someone - some like it, others don't. that's life.

Warzone starter isn't from Strata ??!! (I thought...)
but let's see, I think some questions on their board won't hurt anybody  :wink:

msn messanger... sorry don't have that... and... don't want it...  :wink: ... sorry...
so I would prefer ICQ when it's not a problem for ya...
here AI . . . . . . . . .  Humans
boosted . . . . . . . . . loosing...

Offline lav_coyote25

  • Veteran
  • *
  • Beiträge: 54
faqs, ai scripting and other tech questions
« Antwort #37 am: 2003-08-07, 20:50:54 »
Zitat von: speedy
Zitat
@lav_coyote
some other questions:
also I haven't much time to read all your impressive faqs, ideas and comments...

in regards to the faq's / ideas / comments - not all are mine - and i have given credit to the author of that item - all i do is collect and post on the site - now if i have an idea - i will give myself credit for that idea. if you give me a faq on something - you will receive the credit for writing that item. just making sure you understand that all the items on the site are not MINE but placed there as a resource with the permission of the author.


yes of course as you see...

@lav_coyote:

wow !!
a very well done compilation of FAQs and HowTo's !!


the only reason i wanted to clarify this is some may think i am taking their ideas and calling them my own - which is not the case - ever.  if an idea is mine then i label it as such - if it belongs to you then the credit goes to you.  somebody once mentioned that they were angry about something they saw on a site - they didnt mention any names but - well i took it the wrong way??  dunno.  


I've spoken of these ideas. But don't think I can implement any of these advanced ideas... but let's see...
And yes, I will do some (more) work for the AI as I've done before making the AIBoost-MOD. But it is with all work done by someone - some like it, others don't. that's life.

Warzone starter isn't from Strata ??!! (I thought...)
but let's see, I think some questions on their board won't hurt anybody  :wink:

msn messanger... sorry don't have that... and... don't want it...  :wink: ... sorry...
so I would prefer ICQ when it's not a problem for ya...


i will be possibly on friday am - i have some errands to run first after getting home - then a little sleep (maybe - doubtfull but ya never know) friday night i will have it on if i can get my brain working...  saturday i have some errands to run in the am  but most of saturday i will try to have it up.  sunday as well - monday i start my vacation - the west coast of canada - sechelt b.c. - beautifull mountains and ocean - maybe chat via email that way... we will see.
Documents Project
http://members.shaw.ca/kgmetcalfe/
Mars Campaign site
http://groups.msn.com/wz2100mars/_whatsnew.msnw
http://wztoys.org/xoops/modules/news/

Offline speedy

  • Spezialist
  • *
  • Beiträge: 486
    • http://www.wz2100.de
faqs, ai scripting and other tech questions
« Antwort #38 am: 2003-08-08, 11:03:45 »
hm. that's a little bit bad...
this weekend my grandparents have wedding anniversary and I'll drivin' home for that. So I will be back Sunday in the evening at the earliest... (and to then I don't have any web access!)

but emailing when you at holiday/vacation..., for sure, no problem.

I've testet 130 with my mod - it crashed  :cry:

But the research editor.... wonderful  8)
do ya know how much *new* research topics can be brought in ??
and - how much buildings can be seen in the building window (of the constructors) (reason: some weapon emplacement are *replaced* by others when discoved through research - I will cut this, means leave some of these emplacements still in there...

btw have a nice vacation  :wink:
here AI . . . . . . . . .  Humans
boosted . . . . . . . . . loosing...

Offline Kevin

  • Durchschnitt
  • *
  • Beiträge: 19
    • http://www.ticon.net/~ejmalec/warzone
faqs, ai scripting and other tech questions
« Antwort #39 am: 2003-08-15, 04:23:30 »
Zitat von: speedy
hm. that's a little bit bad...
this weekend my grandparents have wedding anniversary and I'll drivin' home for that. So I will be back Sunday in the evening at the earliest... (and to then I don't have any web access!)

but emailing when you at holiday/vacation..., for sure, no problem.

I've testet 130 with my mod - it crashed  :cry:

But the research editor.... wonderful  8)
do ya know how much *new* research topics can be brought in ??
and - how much buildings can be seen in the building window (of the constructors) (reason: some weapon emplacement are *replaced* by others when discoved through research - I will cut this, means leave some of these emplacements still in there...

btw have a nice vacation  :wink:

One of the major problems we had making 1.12 was warzone's internal limits on research topics.  it was very hard to add anything without removing essential topics.

The number of structures is limited only by the number of tabs that are shown in the game.  the replacements are part of the research data

are you planning to base your work on 1.12?  if you are, you must import the data files into wzck to effectively chnge the standard to 1.12 (which strata hasn't made yet).  This is possible only using the debug switch for wzck, which is -imacheatingscalleywagger.  This is different from the switch for warzone, primarily because strata has problems with spelling ;)

You may also want to look at the gui program I made for makewdg.  the main feature you would use it for is compressing wdg files.  it also has something for name recovery when used with a (nonexistant so far) new version of wdg explorer.  Strata made the compression routine.  There is a description here on coyote's tutorial site, and it can be downloaded from my web page (see below)

I wonder what the auto-translator would have to say about that.  it's best I don't even try :hmm:
The creation of a 1000 lines of code begins with an oversimplified idea that you though would take 100

Offline speedy

  • Spezialist
  • *
  • Beiträge: 486
    • http://www.wz2100.de
faqs, ai scripting and other tech questions
« Antwort #40 am: 2003-08-15, 14:10:22 »
hi Kevin!
nice to see some more guys from Pumkin-2 here  :D

The problem with the replacements... solved (only wanted the mini pod rocket arty and the ripple rocket battery still in there because these two weapons was made stronger for the players...)
Also I've added two more structures in: the nuke and the reactor. Last game play tests worked fine, so I should be under the limits  :wink:

for wzck:

there's a problem in the sensor window. I've made changes to the wide spectrum sensor with wzck 105b (yes very old, but it was STABLE for me  :wink: ) imported it in 130 but nor this window crashes all the time...  :cry:

the next problem in wzck: the research data with are made with wzck are not in the right place, that means directory, it differs from the appropriate .wrf-file-info (have forgotten the exact name of the file...)
not a problem for me, but it should be solved sometime...

I want to add more unit templates to the mod. It seems wzck doesn't handle NEW templates as it does with research topics for example.
That's not a problem for me because I take the output of wzck, add my other stuff to it per own made programs and compile it again with the makewdg program.
Yes I noticed your shell program it seems a great addon to the dos command shell program for me, but I had made my own "shell" for a long time now and still using it  :wink:

and for 1.12 compatibility... I hope Strata will make an update of his proggie which includes a compatibility-switch with 1.12 like he did with 1.11. I think it's not so easy to reassemble all the now different wrf's on my own to make it compatible...

Zitat
This is possible only using the debug switch for wzck, which is -imacheatingscalleywagger. This is different from the switch for warzone, primarily because strata has problems with spelling


 :lol:  :lol:  :lol: yes I've heard it... (as I was on the newst-forums long time ago...)  :lol:  :lol:  :lol:

and yes DON'T TAKE THAT AUTO-TRANSLATOR besides you want us to  break down laughing...  :lol:  :lol:  :lol:
(dont know if that was spelled right, I meant something like underlieing the table and cannot stop laughing... - my english isn't very well at all...)
here AI . . . . . . . . .  Humans
boosted . . . . . . . . . loosing...

Offline Kevin

  • Durchschnitt
  • *
  • Beiträge: 19
    • http://www.ticon.net/~ejmalec/warzone
faqs, ai scripting and other tech questions
« Antwort #41 am: 2003-08-16, 02:30:06 »
Zitat von: speedy
Also I've added two more structures in: the nuke and the reactor.
Reactor?  did you do a reactor with scripting to add power or something else?
Zitat

for wzck:

there's a problem in the sensor window. I've made changes to the wide spectrum sensor with wzck 105b (yes very old, but it was STABLE for me  :wink: ) imported it in 130 but nor this window crashes all the time...  :cry:
That is a problem, and most likely a bug in the program.  please post up the wew file and i'll pass it along to stratadrake.  he may also be able to get the data out and write it in the new format.
Zitat

the next problem in wzck: the research data with are made with wzck are not in the right place, that means directory, it differs from the appropriate .wrf-file-info (have forgotten the exact name of the file...)
not a problem for me, but it should be solved sometime...
I'm not sure exactly why he did this, but he also changed the generated wrf files so it all matches.  Directory names are not actually compiled into the wdg, they are only used for organization
Zitat

I want to add more unit templates to the mod. It seems wzck doesn't handle NEW templates as it does with research topics for example.
That's not a problem for me because I take the output of wzck, add my other stuff to it per own made programs and compile it again with the makewdg program.
you should be able to add new unit templates the same as anything else.  i'll check this out as soon as I get wzck working on this computer (mine isn't working :cry:), and also pass it on to strata.
Zitat

Yes I noticed your shell program it seems a great addon to the dos command shell program for me, but I had made my own "shell" for a long time now and still using it  :wink:
does yours do compression and automatic re-compilling?  in any case, will you give it to me?  I can give you the compression routine in a good form if you want to use it in your own project
Zitat

and for 1.12 compatibility... I hope Strata will make an update of his proggie which includes a compatibility-switch with 1.12 like he did with 1.11. I think it's not so easy to reassemble all the now different wrf's on my own to make it compatible...
agreed.  it will probably be after the final release of 1.12, though
Zitat

Zitat
This is possible only using the debug switch for wzck, which is -imacheatingscalleywagger. This is different from the switch for warzone, primarily because strata has problems with spelling


 :lol:  :lol:  :lol: yes I've heard it... (as I was on the newst-forums long time ago...)  :lol:  :lol:  :lol:
as speedy?  I probably wouldn't remember, but I might.
Zitat

and yes DON'T TAKE THAT AUTO-TRANSLATOR besides you want us to  break down laughing...  :lol:  :lol:  :lol:
(dont know if that was spelled right, I meant something like underlieing the table and cannot stop laughing... - my english isn't very well at all...)
I can read it ok.  it's not spelling that's a problem, it's the strange grammer.
The creation of a 1000 lines of code begins with an oversimplified idea that you though would take 100

Offline speedy

  • Spezialist
  • *
  • Beiträge: 486
    • http://www.wz2100.de
faqs, ai scripting and other tech questions
« Antwort #42 am: 2003-08-16, 04:25:28 »
The Reactor.
Yes I did it with scripting in the AI-Files. Easy:

event givehelp(every, 17)
{
   if( (player == selectedPlayer) or (not myResponsibility(player)) )
   {
      count = 0;
      initEnumStruct(FALSE,powGen,player,player);
      structure= enumStruct();
      while(structure != NULLOBJECT)
      {
         if( (structureComplete(structure)) and (testStructureModule(player, structure, 0)) )
         {
            count = count + 1; addPower(1, player);
         }
         structure = enumStruct();
      }
     
      count2 = 0;
      initEnumStruct(FALSE,reactor,player,player);
      structure= enumStruct();
      while(structure != NULLOBJECT)
      {
         if(structureComplete(structure))
         {
            count2 = count2 + 1;
            addPower(50, player);
         }
         structure= enumStruct();
      }
     
      if( playerPower(player) > (3000 * count)+(30000 * count2)+10000 )
      {
         setPowerLevel((3000 * count)+(30000 * count2)+10000, player);
      }
   }
   else
   ...

the first block (count=0...) adds for every upgraded power generator a +1 to the player's "money".
the second block (count2=0...) adds for every build reactor +50 to the player.
And the last block limits the maximum "money" a player can have.
very easy thing.

------------------------------------------

my wdg ? okay, no problem, thanx, I will send it to you (even if Strata isn't very happy seeing my mod  :wink: )

------------------------------------------

the wrf-problem. yes for sure the directory names are not required for the wdg, but the finished wdg crashed my warzone until i changed the appropriate directory names... don't know why, perhaps you can see it when you get my mod...

------------------------------------------

wdg compression ? no, doesn't even know that's possible... (until I've read it on lav_coyote's website...)
you want my shell ??  :lol:  :lol:  :lol: it's a dos batch  :lol:  :lol:  :lol: don't think you really want it...  :wink: But it's working for me as I'm doing some more things with it...

------------------------------------------

newst forums... yes I was there as speedy (or speedyR or speedy46 because sometimes the name isn't available for me...)

------------------------------------------

Zitat
I can read it ok. it's not spelling that's a problem, it's the strange grammer.


ups. strange grammar. grammar?? I've heard that word somewhere...  :lol:  :lol: but what does it mean  :lol:  :lol:  :lol:  :lol:
okay, just joking. Can you tell me where I was doing mistakes ?
here AI . . . . . . . . .  Humans
boosted . . . . . . . . . loosing...

Offline Kevin

  • Durchschnitt
  • *
  • Beiträge: 19
    • http://www.ticon.net/~ejmalec/warzone
faqs, ai scripting and other tech questions
« Antwort #43 am: 2003-08-16, 04:58:43 »
you can add the script directly to the wdg file if you declare it in stats.wrf.  then you can also have a script file just for it, and it's independent of the ai files :)

I made a reactor script also.  It is much shorter than yours but doesn't do as much ;).  Strata also made a power cap script, but his was a progressively increasing rate cap (it's in 1.12, maybe)

send the wew file, the one for wzck.  not the wdg, I already have that of course.

yes, I still want your shell, whatever it is.

if you want a feature added to my program, I will add it for you.

as for the grammer, It is still very readable (you are better than some on our own board), but as you asked I will re-write your message with the proper grammer.
I will write it as I would, and note problems

Zitat
The Reactor.
Yes I did it with scripting in the AI-Files. Easy[not a sentence, who cares]:
[code seems to be perfect, your pseudo c/java modified hybrid script talking is just fine :p]
the first block (count=0...) adds a +1 to the player's "money" for every upgraded power generator. [this was technically correct, a little awkward]
the second block (count2=0...) adds for +50 to the player's power for every complete reactor [only problem build->complete]
And the last block limits the maximum "money" a player can have, a very easy thing to do.

------------------------------------------

[You want] my wdg ? okay, no problem, thanks, I will send it to you (even if Strata isn't very happy at seeing my mod) [was that wrong? maybe, only a teacher of english would notice :)]

------------------------------------------

As for the wrf-problem. yes, I know the directory names are not required for the wdg, but the finished wdg crashed warzone until I changed the appropriate directory names... I don't know why, perhaps you can see it when you get my mod... [more little things]

------------------------------------------

wdg compression ? no, I didn't even know that was possible... (until I read it on lav_coyote's website...)
you want my shell ??    it's a dos batch. I don't think you really want it...  But it's working for me as I'm doing some more things with it...

------------------------------------------

newst forums... yes I was there as speedy (or speedyR or speedy46 because sometimes the name wasn't available for me...)

------------------------------------------

Quote:
I can read it ok. it's not spelling that's a problem, it's the strange grammer.
 


ups[what is this word]. strange grammar. grammar?? I've heard that word somewhere...   but what does it mean?
okay, I'm just joking. Can you tell me where I was making mistakes ?
The creation of a 1000 lines of code begins with an oversimplified idea that you though would take 100

Offline Kevin

  • Durchschnitt
  • *
  • Beiträge: 19
    • http://www.ticon.net/~ejmalec/warzone
faqs, ai scripting and other tech questions
« Antwort #44 am: 2003-08-16, 05:11:28 »
For reference, from previous post.

my nuclear reactor script
event nuclearReactor(every, 10)
{
 playnum=0;
 while (playnum < multiPlayerMaxPlayers)
 {
  initEnumStruct(FALSE,nucReactor,playnum,playnum);
  structure = enumStruct();
  while(structure != NULLOBJECT)
  {
   if(structureComplete(structure))
   {
    addPower(4,playnum);
   }
   structure = enumStruct();
  }
  playnum=playnum+1;
 }
}


strata's "soft" power cap, this is from the source of 1.12 build 7-1
PowerCap.slo:
/* Power Cap script.  (C) TWZ, 2001-03
 *
 * This script assigns a "soft" limit to how much power
 * the player can store in their reserves.  Excess power
 * gradually dissipates.
 *
 * This results in a power limit based upon how much power
 * the player generates per second.  It is related as follows:
 *
 *   (limit) = startCap + (genRate) * capRate
 *
 *   (genRate) = ((limit) - startCap) / capRate
 *
 * where genRate is the player's power generator output per second.
 *
 * See the matching VLO file for the actual values.
 *
 * */

private INT startCap, capRate;
private INT power, num;

event CapMe(every, 11)
{
  power = playerPower(selectedPlayer);

  if (power > startCap)
  {
    if (capRate > 0)
    {
      num = (power - startCap) / capRate;
      setPowerLevel(power - num, selectedPlayer);
    }
  }
}


while were at it (it is public after all), look at the way the active mines are stored.  this is done because of some very pesky and pervasive multiplayer issues.
LandMine.slo:
/* ************************** */
/*                            */
/*     Warzone Land Mines     */
/*   (c) 2002-3, Strata/TWZ   */
/*                            */
/* ************************** */

// Static variables defined in the VLO
private FEATURESTAT Mine;
private STRUCTURESTAT BuildMine[8];
private WEAPON Explosion[8];
private WEAPON Fizzle, Blip;
private BODY Miner[2];

// Used for tweaking and debugging
private  INT  setRange, actRange;
private  INT  debug;

// Temporary script variables
private  INT  player;
private  INT  count;
private  INT  temp, tempp;
private  BOOL  NotReady;
private  STRUCTURE strucMine;
private  FEATURE testMine;
private  DROID target;

event CheckMines(every, 10)
{
// Scan all active landmines.  Detonate if necessary.


// Must do this to all players, for MP compatibility
player = 0;
while (player < 8)
{
  if (debug > 0) {setPowerLevel(1000,player);}
  initGetFeature(Mine, player, selectedPlayer);
  testMine = getFeature(selectedPlayer);
  while (testMine != NULLOBJECT)
  {
    // Retrieve type & player info from the mine
    temp = testMine.health / 10;
    tempp = testMine.health - 10 * temp;

    // The player can see their own mines only.
    if (tempp > 4)
      {fireWeaponAtLoc(Blip, testMine.x, testMine.y);}

    if (debug > 0) {setPowerLevel(1200,player);}

    target = droidTargetInArea(player, player, (testMine.x - actRange), (testMine.y - actRange), (testMine.x + actRange), (testMine.y + actRange));
    if (target != NULLOBJECT)
    {
      if (debug > 0) {setPowerLevel(1300,player);}

      // Rule 1: Only ground units may detonate land mines.
      // (Also note that the mine layer borg does not "trip" them ;) )
      if ((target.z < testMine.z + 96) and (target.body != Miner[0]))
      {
        if (debug > 0) {setPowerLevel(2000+100*temp,player);}

        // Make sure only a mine can go boom.
        if (temp < 8)
        {
          if (target.body == Miner[1])
          {
            if (debug > 0) {setPowerLevel(7770,player);}
            // Mine Sweeper 'borg gets lucky!
            fireWeaponAtObj(Fizzle, testMine);
          }
          else
          {
            if (debug > 0) {setPowerLevel(6660,player);}
            // Anyone else, well... >B}
            fireWeaponAtObj(Explosion[temp], target);
          }
          destroyFeature(testMine);
        }
      }
    }
    testMine = getFeature(selectedPlayer);
  }
  player = player + 1;
}



// Activate newly set mines when the owner is at a "safe" distance
//
// Again, this must be done for all players to be MP compatible
player = 0;
while (player < 8)
{
  count = 0;
  while (count < 8)
  {
    initEnumStruct(FALSE, BuildMine[count], player, player);
    strucMine= enumStruct();
    while (strucMine!= NULLOBJECT)
    {
      if (structureComplete(strucMine))
      {
        NotReady = droidInRange(player, strucMine.x, strucMine.y, setRange);

        if (NotReady)
        {
          target = droidTargetInArea(player, player, (strucMine.x - actRange), (strucMine.y - actRange), (strucMine.x + actRange), (strucMine.y + actRange));
          if (target != NULLOBJECT)
          {
// Mine layer droids can activate their own mines
            if (target.body == Miner[0]) { NotReady= FALSE; }
          }
        }

        if (NotReady== FALSE)
        {
          testMine = addFeature(Mine, strucMine.x, strucMine.y);

          // Encode the mine's type into the feature's health stat

          // *** NOTE! *** Mine must not be declared indestructible via WZCK //

          if (player == selectedPlayer)
            {temp = 10 * count + 8;}
          else
            {temp = 10 * count + 3;}

          forceDamageObject(testMine, temp);
          destroyStructure(strucMine);
        }
      }
      strucMine = enumStruct();
    }
    count = count + 1;
  }
  player = player + 1;
}

}
The creation of a 1000 lines of code begins with an oversimplified idea that you though would take 100