Author Topic: 'distantnoise' - Eden/plymouth, Sandbox  (Read 19615 times)

Offline Flashy

  • Sr. Member
  • ****
  • Posts: 391
'distantnoise' - Eden/plymouth, Sandbox
« on: September 15, 2012, 02:55:06 PM »
This is an idea I got from Spikerocks, who wrote about a sandbox gametype
Quote from: Spikerocks101,Aug 25 2012, 07:54 PM
Never played campaign, mostly cause I don't like not having everything at once. I played hours upon hours on the Colony missions thou. I wish I kept some of my old saves. Another fun map was the Tutorial levels, cause you can just mess around on it, and have no mission to worry about.

On that note, why haven't we made a colony mission with no goal? Maybe you can send waves in to attack you by typing something like "/attack medium" or something.
This is an early release, not even half of my minimum requirements are met and I didn't test all of it yet, but it already works.
Basically, you can issue an command via chat (in singleplayer there's no prefix required), along with a list of arguments.

Commands that are implemented as of now:

spwn
|--
Description: Spawns one or multiple predefined spawn templates
|--
Format ::= "spwn" [ " " ( <groupnum>+ | "x" ) ]
<groupnum> ::= <opt-space> <digit>
<opt-space> ::= " " <opt-space> | ""
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
|--
Example
"spwn 6"
Effect: Spawns group 6
"spwn x"
Effect: Spawns groups 0 to 9
"spwn"
Effect: The very same as the last example
"spwn 735"
Effect: Spawns groups 7, 3 and 5
"spwn 7 3  5"
Effect: The very same as the last example

grp
|--
Description: Adds up to 32 units to a predefined spawn template
Weapon:
Acid cloud = A
EMP = e
ESG = E
Laser = L
Microwave = M
Rail gun = R
RPG = r
Starflare = s
Sticky foam = S
Supernova = N
Thors Hammer = T
Energy Cannon(Scorpion) = C
Chassis:
Lynx = L
Panther = P
Tiger = T
Scorpion = C
|--
Format ::= "grp " <groupnum> <typeinfo>+
<opt-space> ::= " " <opt-space> | ""
<groupnum> ::= <digit>
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
<typeinfo> ::= <opt-space> <weapon> <chassis> <amount> | <opt-space> "CC" <amount>
<weapon> ::= A | e | E | L | M | R | r | s | S | N | T
<chassis> ::= L | P | T
<amount> ::= [ 0 | 1 | 2 ] <digit> | 3 ( 0 | 1 | 2 )
// <amount> specifies a range from 0 to 32
|--
Example
"grp 0 TT2"
Effect: Adds 2 Thors Hammer Tigers to group 0
"grp 4rP4 LL5AL1 sT1"
"grp 4 LL2 MP5"
Effect: Adds 4 RPG Panthers, 7 Laser Lynx, 1 Acid Cloud Lynx, 1 Starflare Tiger and 5 Microwave Panthers to group 4
"grp 4TL2MT3NT10"
Effect: Adds 2 Thors Hammer Lynx, 3 Microwave Tigers and 10 Supernova Tigers to group 4
"grp 4 TL2 MT3 NT10"
Effect: The very same as the last example

loc
|--
Description: Sets up a predefined spawn location
|--
Format ::= "loc " <spawnnum> " " <location> [" " <priority>]
<location> ::= <number> "," <number>
<spawnnum> ::= <digit>
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
<number> ::= <digit> <number> | <digit>
// <number> is not actually unlimited, but bound to int ranges.
<priority> ::= [[ 0 | 1 ] <digit>] <digit> | 2 ( 0 | 1 | 2 | 3 | 4 ) <digit> | "25" ( 0 | 1 | 2 | 3 | 4 | 5)
// <priority> specifies a range from 0 to 255
|--
Example
"loc 9 145,155"
Effect: Sets spawn location 9 to x=145, y=155 priority=1
"loc 3 45,63 19"
Effect: Sets spawn location 9 to x=45, y=63 priority=19
"loc 1 100,100 10"
"loc 2 25,60 5"
Effect: Sets up two spawn locations. In 5 cases out of 15, a new group will spawn at location 2, in 10 cases out of 15, it spawns at location 1
"loc 8 2,1 4"
"loc 3 225,15"
"loc 6 24,10 2"
Effect: Sets up three spawn locations. In 4 cases out of 7, a new group will spawn at location 8, in 2 cases out of 7, it spawns at location 6, in one case out of 7, it spawns at location 3

reset
|--
Description: Resets data set by other commands
|--
Format ::= "reset " <command> [" " <argnum>+]
<argnum> ::= <opt-space> <digit>
<opt-space> ::= " " <opt-space> | ""
<command> ::= "grp" | "loc" | "file"
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
|--
Example
"reset grp 5"
Effect: Removes all units from template group 5 (Does not affect units already on the field)
"reset loc 2"
Effect: Resets location 2
"reset grp"
Effect: Removes all units from all template groups
"reset loc"
Effect: Resets all locations
"reset file"
Effect: Clears the file name currently set as sink for save operations
"reset grp 30  6"
Effect: Removes all units from group 0, 3 and 6

load
|--
Description: Loads commands from a file located in a folder called fl_file in the Outpost 2 directory, appending a ".txt" to the name supplied by the user.
Note: If the command was entered by a user, it is a primary call. If it is read from a file, it is a secondary call. If a secondary call tries to load a file that was already read but not fully executed during the processing of the same primary call, it fails.
Note: A primary load call displays special behaviour; The command is not stored in the internal "last command" buffer until it was fully executed. Additionally, at the beginning of the primary load call, the "last command" buffer is cleared.
|--
Format ::= "load " <filename>
// <filename> accepts any characters Windows would, except for full stops/periods
|--
Example
Quote from: Test.txt
loc 0 100,99 10
grp 0 MT10 ML1
grp 2 ML9
spwn x
"load Test"
Effect: Loads Test.txt, which in turn sets up spawn location 0 with x=100, y=90 and priority=10, spawn template 0 with 10 Microwave Tigers and 1 Microwave Lynx, spawn template 2 with 9 Microwave Lynx and finally, spawns all groups, thus spawning 20 vehicles total
Quote from: MyCommands.txt
loc 0 25,7
load Group
spwn 0 3 1
reset loc
Quote from: Group.txt
reset grp
grp 1 rP32
"load MyCommands"
Effect: Loads MyCommands.txt, which in turn sets up a spawn location, loads Group.txt, which wipes all group infos and sets up group 1. Back in MyCommands, it spawns group 0, 1 and 3 and lastly, wipes all spawn location information.

file
|--
Description: Sets a filename within fl_file as target of following save operations, appending a ".txt" to the name supplied by the user.
|--
Format ::= "file " <filename>
// <filename> accepts any characters Windows would, except for full stops/periods
|--
Example
"file MyFile"
Effect: Any following save operations will append data to a file called MyFile.txt, which will be created if it doesn't exist.

save
|--
Description: Saves a setting in an appropriate format so loading said file will correctly restore all data active at the time the save command was given.
Note: The downloadable package comes with a savescript.txt file, which will always save all saveable information in a file called savefile.txt, and a do_save.txt file, which does the same as savescript.txt, but does not set or reset any file name, requiring the user to supply one beforehand.
|--
Format ::= "save " <command> [" " <argnum>+]
<argnum> ::= <opt-space> <digit>
<opt-space> ::= " " <opt-space> | ""
<command> ::= "grp" | "loc" | "time"
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
|--
Example
"file Test"
"loc 1 140,210 10"
"loc 6 10,51 1"
"grp 2 rP10"
"save loc"
"save grp"
Effect: Saves "loc 1 140,210 10", "loc 6 10,51", "reset grp 2" and "grp 2 rP10" to Test.txt.
"loc 1 140,210 10"
"loc 6 10,51 1"
"grp 2 rP10"
"load savescript"
Effect: Nearly the same as the last example, except that all data will be saved to savefile.txt instead.
"loc 1 140,210 10"
"loc 6 10,51 1"
"grp 2 rP10"
"file Test2"
"load do_save"
Effect: Nearly the same as the last example, except that all data will be saved to Test2.txt instead.
"file Test3"
"loc 1 140,210 10"
"loc 2 35,16 4"
"loc 6 10,51 1"
"save loc 61"
Effect: Saves "loc 1 140,210 10" and "loc 6 10,51" to Test3.txt.
"file Test3"
"loc 1 140,210 10"
"loc 2 35,16 4"
"loc 6 10,51 1"
"save loc 6  1"
Effect: The same as the last example

time
|--
Description: Sets up time triggers which spawn their associated template groups
Note: When using the "save" command, all triggers, enabled or not, are saved as disabled. If you want those saved triggers to be enabled upon loading them with the "load" command, you have to do so manually either with the "start" command or by editing the commands stored in the file.
Note: If a trigger is not set to repeat, it counts as disabled after it fired, it's not deleted and can still be saved via "save" as well as restarted via "start"
Note: The minimum value for time is set to 100 ticks (1 mark)
|--
Format ::= "time " <groupnum> " " <timesettings> " " <enabled> [ <repeat> ]
<groupnum> ::= <digit>
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
<timesettings> ::= <number> [ "," <number> ]
<number> ::= <digit> <number> | <digit>
// <number> is not actually unlimited, but bound to int ranges.
<enabled> ::= 0 | 1
<repeat> ::= " R"
|--
Example
"loc 9 100,40"
"grp 4 CC3"
"grp 5 rP10"
"time 4 3000 1 R"
"time 5 6000,10000 1 R"
Effect: Sets up a location, two groups and two triggers. Trigger 4 is set to repeat and will fire exactly every 3000 ticks(30 marks)(relative time) and spawns group 4 (3 Scorpions). Trigger 5 is set to repeat and will fire at some point between 6000 and 10000 ticks (60 and 100 marks)(relative time) and spawns group 5 (10 RPG Panthers).
"loc 2 20,30"
"grp 7 AL8"
"time 7 1000 1"
Effect: Sets up a group, a location and a trigger which will spawn it's group after exactly 1000 ticks (10 marks) and switches to disabled afterwards.
"loc 2 20,30"
"grp 7 AL8"
"time 7 1000 0"
Effect: Sets up a group, a location and a disabled trigger, and nothing happens.
"grp 2 LL10"
"time 2 100 1 R"
Effect: Sets up a group and a trigger, which spams you with error messages every single time mark because you forgot to set up any location (true story).
"time 5 100,400 1 R"
"time 5 4000,10000 0"
Effect: Sets up trigger 5 and subsequently overrides it with a disabled trigger, so nothing happens.
"time 3 30000 1 R"
"file Game"
"save time 3"
Effect: Saves information for a disabled trigger "time 3 30000 0 R" to Game.txt

start
|--
Description: Restarts a command aspect
|--
Format ::= "start " <command> [" " <argnum>+]
<argnum> ::= <opt-space> <digit>
<opt-space> ::= " " <opt-space> | ""
<command> ::= "time"
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
|--
Example
"time 6 100 0"
"start time 6"
Effect: Sets up a disabled trigger and enables it; As if "time 6 100 1"
"time 7 7500 0"
"time 2 6000 0 R"
"time 4 80000 0"
"start time"
Effect: Sets up 3 disabled triggers and restarts all of them.
"time 1 5000 0 R"
"time 2 9000 0"
"time 3 70000 0 R"
"start time 13"
Effect: Enables trigger 1 and 3, but not 2.

stop
|--
Description: Stops a command aspect
Note: "stop" always stops a trigger, even if it will fire in a short while
|--
Format ::= "stop " <command> [" " <argnum>+]
<argnum> ::= <opt-space> <digit>
<opt-space> ::= " " <opt-space> | ""
<command> ::= "time"
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
|--
Example
"time 6 100 1"
"stop time 6"
Effect: Sets up an enabled trigger and disables it; As if "time 6 100 0"
"time 7 7500 1"
"time 2 6000 1 R"
"time 4 80000 1"
"stop time"
Effect: Sets up 3 enabled triggers and disables all of them.
"time 1 5000 1 R"
"time 2 9000 1"
"time 3 70000 1 R"
"stop time 13"
Effect: Disables trigger 1 and 3, but not 2.

storm
|--
Description: Controls storms, natural aswell as player-spawned.
Note: Natural storms are activated by default.
|--
Format ::= "storm " <opt-space> <location> " " <opt-space> <location>
<location> ::= <number> "," <number>
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
<number> ::= <digit> <number> | <digit>
// <number> is not actually unlimited, but bound to int ranges.
<opt-space> ::= " " <opt-space> | ""
|--
Example
"storm 16,209 30,229"
Effect: Initiates a storm that spawns after 10 marks and travels from 16,209 to 30,229
"stop storm"
Effect: Disables all natural storms that have not been initialized yet.
"start storm"
Effect: Enables all natural storms
"start storm"
"save storm"
Effect: saves "start storm" to the associated file
"stop storm"
"save storm"
Effect: saves "stop storm" to the associated file

meteor
|--
Description: Controls meteors, natural aswell as player-spawned.
Note: Natural meteors are activated by default.
|--
Format ::= "meteor " <opt-space> <location>
<location> ::= <number> "," <number>
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
<number> ::= <digit> <number> | <digit>
// <number> is not actually unlimited, but bound to int ranges.
<opt-space> ::= " " <opt-space> | ""
|--
Example
"meteor 16,209"
Effect: Initiates a meteor that spawns after 10 marks and hits 16,209
"stop meteor"
Effect: Disables all natural meteors that have not been initialized yet.
"start meteor"
Effect: Enables all natural meteors
"start meteor"
"save meteor"
Effect: saves "start meteor" to the associated file
"stop meteor"
"save meteor"
Effect: saves "stop meteor" to the associated file

vortex
|--
Description: Controls vortices, natural aswell as player-spawned.
Note: Natural vortices are activated by default.
|--
Format ::= "vortex " <opt-space> <location> " " <opt-space> <location>
<location> ::= <number> "," <number>
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
<number> ::= <digit> <number> | <digit>
// <number> is not actually unlimited, but bound to int ranges.
<opt-space> ::= " " <opt-space> | ""
|--
Example
"vortex 16,209 30,229"
Effect: Initiates a vortex that spawns after 10 marks and travels from 16,209 to 30,229
"stop vortex"
Effect: Disables all natural vortices that have not been initialized yet.
"start vortex"
Effect: Enables all natural vortices
"start vortex"
"save vortex"
Effect: saves "start vortex" to the associated file
"stop vortex"
"save vortex"
Effect: saves "stop vortex" to the associated file

quake
|--
Description: Controls quakes, natural aswell as player-spawned.
Note: Natural quakes are activated by default.
|--
Format ::= "quake " <opt-space> <location> " " <opt-space> <location>
<location> ::= <number> "," <number>
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
<number> ::= <digit> <number> | <digit>
// <number> is not actually unlimited, but bound to int ranges.
<opt-space> ::= " " <opt-space> | ""
|--
Example
"quake 16,209"
Effect: Initiates a quake that spawns after 10 marks and hits 16,209
"stop quake"
Effect: Disables all natural quakes that have not been initialized yet.
"start quake"
Effect: Enables all natural quake
"start quake"
"save quake"
Effect: saves "start quake" to the associated file
"stop quake"
"save quake"
Effect: saves "stop quake" to the associated file

version
|--
Description: Manages version info. Meant to be used to distinguish old saves from new ones.
|--
Format ::= "version"
|--
Example
"version"
Effect: Prints the current version as a message. In version 0.4.1-136, this is "v0.4.1-136"
"save version"
Effect: Saves the current version to the associated file. In version 0.4.1-136, this is "noop v0.4.1-136"

noop
|--
Description: Does nothing. Meant to be used for comments in files.
|--
Format ::= "noop" [ " " <anything> ]
|--
Example
"noop"
Effect: Does nothing
"noop example"
Effect: Does nothing
"noop v0.4.1-136"
Effect: Does nothing
"noop storms"
Effect: Does nothing
"noop file spwn loc grp"
Effect: Does nothing
"noop 235ngiwo4gJIIEI!"
Effect: Does nothing

evnt
|--
Description: Manages random events, timed and instant.
|--
Format ::= "evnt" [ " " <opt-space> <timesettings>]
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
<timesettings> ::= <number> [ "," <number> ]
<number> ::= <digit> <number> | <digit>
// <number> is not actually unlimited, but bound to int ranges.
<opt-space> ::= " " <opt-space> | ""
|--
Example
"evnt"
Effect: Rolls a random event instantly
"evnt 200"
Effect: Rolls a random event every 200 ticks (2 marks)
"evnt 300,450"
Effect: Rolls a random event every 300 to 450 ticks (3 to 4,5 marks)
"save evnt"
Effect: Saves event timer information
"reset evnt"
Effect: Resets all event timer information
"stop evnt"
Effect: Stops the event timer.
"start evnt"
Effect: Restarts the event timer.


Note: All settings done via these commands are preserved by OP2's saving/loading mechanism.

Upcoming: More commands, random events

Known bugs:
-None

Updates:
->0.1-064
#->0.2-086
-Updated "spwn" to accept optional white-spaces between each group number
-Updated "loc" to take spaces instead of ":" and "="
-Updated list of bugs
-Added command "load"
-Added random electric storms
#->0.3-091
-Fixed incorrect use of loc generating too many error messages
-Added command "save"
-Added command "file"
-Added folder "fl_file"
-Added file "fl_file\savescript.txt"
#->0.3.1-106
-Updated "spwn" to accept an empty parameter list
-Updated "load" behaviour
-Updated "grp" to accept an additional expression variant
-Updated "reset" and "save" to accept a variable argument list
-Fixed incorrect "last command" buffer functionality
-Added file "fl_file\do_save.txt"
-Added error messages in case the user enters an unknown command
#->0.4-122
-Updated file "fl_file\do_save.txt"
-Added saveable command "time"
-Added command "start"
-Added command "stop"
#->0.4.1-136
-Updated file "fl_file\do_save.txt"
-Fixed memory leak under edge case low memory conditions
-Fixed slot selection interpreting 'all slots selected' as 'none selected'
-Added random meteors, vortexes and quakes
-Added saveable command "storm"
-Added saveable command "meteor"
-Added saveable command "vortex"
-Added saveable command "quake"
-Added saveable command "version"
-Added command "noop"
#->0.4.2-155
-Updated file "fl_file\do_save.txt"
-Added a very small selection of random events
-Added saveable command "evnt"
#->0.4.3-158
-Added alternative land rush-style variation

Download v0.4.3-158 Alpha

Download source v0.4.3-158 Alpha

As usual, if you encounter any bugs, please tell me.
« Last Edit: July 05, 2014, 09:39:30 AM by Flashy »
Praise the mighty light towers!!!

Offline TH300

  • Hero Member
  • *****
  • Posts: 1404
    • http://op3game.net
'distantnoise' - Eden/plymouth, Sandbox
« Reply #1 on: September 15, 2012, 04:10:36 PM »
Nice idea.

The commands could be less confusing. I don't see why "loc" requires a ":" whereas all others don't. And the "=" being usable instead of th ":". Imo you should think of one simple syntax and use that everywhere.

Also, I must admit, I'll probably find it too time consuming to enter large text strings before I can fight. Maybe you can add a function that loads groups and locations from text files?
« Last Edit: September 15, 2012, 04:11:07 PM by TH300 »

Offline Flashy

  • Sr. Member
  • ****
  • Posts: 391
'distantnoise' - Eden/plymouth, Sandbox
« Reply #2 on: September 15, 2012, 04:26:21 PM »
Oh, you're right about the "loc" format, I believe it's a leftover from an earlier concept involving the ability of setting up multiple locations with one line, but since it's more distinct now, I'll probably replace ":" and "=" with spaces.

As to the proposal of loading commands out of files, that's a nice idea, I didn't think of that. Maybe I can just read the file and handle each line like one chat command, even though that's not entirely compatible with my current design.

Edit:
And I just realised one of my examples is wrong
Code: [Select]
"loc 8:2,1=4"
"loc 3=225,15"
"loc 6:24,10=2"
In this case, the equality sign in the second line was meant to be a colon, fixed.
« Last Edit: September 15, 2012, 04:49:26 PM by Flashy »
Praise the mighty light towers!!!

Offline Hidiot

  • Hero Member
  • *****
  • Posts: 1018
'distantnoise' - Eden/plymouth, Sandbox
« Reply #3 on: September 15, 2012, 05:15:28 PM »
Curious, how did you implement commands?

And yeah, consistency between commands helps a lot in memorizing them, and getting them right.
"Nothing from nowhere, I'm no one at all"

Offline Flashy

  • Sr. Member
  • ****
  • Posts: 391
'distantnoise' - Eden/plymouth, Sandbox
« Reply #4 on: September 16, 2012, 01:19:07 PM »
Post 1)
The system behind the commands is a manager class that reads all characters up until a space character (or termination character '\0') and use it for searching the corresponding command module, which returns the same string when calling it's virtual function char const* Module::Name(). The rest of the entered string after the space (or NULL) is forwarded to the located module, which resumes reading the string.
the reset command is a special case, since it requires interaction with another module and it only passes two binary arguments to the responsible module.

As for consistency, I imagined the general format to be
command-name parameter-list
In case the module responsible for the execution comes with a slot setting (group 0 to 9, as with spwn, loc and grp) it's the first parameter of the parameter list, separated from the rest of the list (if there is any) by a space. So yeah, the colon and equality separators of loc are quite incongruous in comparison. The grp command on the other hand, can be compatible with that format, if you use the optional spaces, but in favour of the capability to shorten commands (the amount of characters you can enter ingame is rather limited) it also works without.
~~~
Post 2)
New update, incorporating some ideas
#->0.2-086
-Updated "spwn" to allow optional white-spaces between each group number
-Updated "loc" to take spaces instead of ":" and "="
-Updated list of bugs
-Added command "load"
-Added random electric storms

Also, you may notice that the new files are much smaller. This is just due to me removing some debugging extras I forgot to detach last time.
« Last Edit: September 17, 2012, 01:39:26 AM by Flashy »
Praise the mighty light towers!!!

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
'distantnoise' - Eden/plymouth, Sandbox
« Reply #5 on: September 17, 2012, 10:19:13 AM »
fascinating...you know flashy, you've just got me interested in making maps again, lol

Does this project rely on the pseudo-AI coding that is done individually for maps, use a general AI that can accomodate for terrain features, or something else?
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline Flashy

  • Sr. Member
  • ****
  • Posts: 391
'distantnoise' - Eden/plymouth, Sandbox
« Reply #6 on: September 20, 2012, 01:22:41 PM »
Post 1)
Actually, the only thing controled by a pseudo AI are the spawned groups, which are simply OP2 internal FightGroups which are set to destroy or die trying(aka spawnedGroup.DoAttackEnemy(); ). The real strategic positioning and the group content is set up by a user, so there isn't any need to recognise obstacles, except for OP2's own pathfinding mechanism, and it already does so by default.
~~~~~~~~~
Post 2)
And I finally got that update ready:

#->0.3-091
-Fixed incorrect use of loc generating too many error messages
-Added command "save"
-Added command "file"
-Added folder "fl_file"
-Added file "fl_file\savescript.txt"

"reset" can now also reset the "file" command's file name buffer. You also might appreciate that "save" uses the very same format as "reset", as it adopts the same interaction mechanic, which leads me to my next point: I'll probably make "reset" and "save" accept multiple optional digit-arguments, just like "spwn". I just don't see why you have to enter the same command several times just to reset some specific options.

Oh, and you can forget about the memory usage improvement of the last update, the new components use up more memory than the debugging config.
~~~~~~~~~
Post 3)
And revision update:

#->0.3.1-106
-Updated "spwn" to accept an empty parameter list
-Updated "load" behaviour
-Updated "grp" to accept an additional expression variant
-Updated "reset" and "save" to accept a variable argument list
-Fixed incorrect "last command" buffer functionality
-Added file "fl_file\do_save.txt"
-Added error messages in case the user enters an unknown command

I'm gradually aligning the commands to a more uniform format: "spwn" learns a lesson from "reset" and "save" about an empty digit parameter list meaning as much as 'spawn all groups'; The x-Notation will remain valid though. In return, "reset" and "save" get to copy "spwn"'s behaviour of accepting a variable digit list separated by optional space characters. "load" as well as the "last command" mechanism are completely redone to improve file loading behaviour: Not only do both of these work now, but a secondary load also allows to load the same file again if the last secondary load call concerning that particular file is completed. As an improvement to the automated saving scripts, I added do_save.txt to the package. It will be updated with new saveable commands just as savescript.txt, but unlike savescript.txt, it doesn't dictate or reset a filename. Instead, the user has to set one up before loading do_save.txt. In fact, savescript as of now just sets a filename, loads do_save.txt and resets the filename again. Furthermore, "grp" is now capable of spawning scorpions; I always forget to include those poor little things.
Lastly, I fixed the documentation always mentioning fl_files instead of the correct folder name fl_file.
« Last Edit: September 20, 2012, 01:26:38 PM by Flashy »
Praise the mighty light towers!!!

Offline Spikerocks101

  • Hero Member
  • *****
  • Posts: 711
'distantnoise' - Eden/plymouth, Sandbox
« Reply #7 on: September 21, 2012, 01:53:14 AM »
WOW! AWESOME! This is pretty sick Flashy. Thanks for taking note of my post, I didn't expect anyone to go "Spike had a good idea, lets make it". I was playing around with the thing for a bit. It became so easy to just send in attack that I usually just kill my self each game with 1000 Thor Tigers spawing in my home base, lol. Just to be clear where I got the idea from is from the game Stronghold. In it, they have a free build area, which sucked, cause all you could do was build, but then in a patch, they allowed you to issue certain commands like "send an army to attack you" or "plague hits your own village".

I had some more ideas for command and such you can have. Obviously, I think it is pretty great as is, and these are just ideas. First one is not a command, but more of a map idea. Simply, have fixes map with certain areas where enemies are forced to spawn. So it basically removes the loc command and has lets say 3 fixed location where units can spawn at random. Again, if you played Stronghold, this idea is simply the sign post in stronghold, which just showed where on the map enemies will spawn. If you showed me a bit of how to implement your code into a simple map, I'd like to do this my self.

The second idea is more to do with events, where you can call for an event to happen, or a random event to happen. Events could be good or bad things, for example: a meteor shower (that could simple be spawn 5 meteors with in 50 tiles from command center), a population boom (maybe you get babies born equal too 10% of your population, which is a whole ton), a group of survivors appear (a few vehicles at random appear, maybe ranging from damaged scouts to convecs with rare buildings like arachnid factory or consumer goods factory). Continuing with events, you could potentially have it so it sends a random event every few ticks (ie, "event rnd 100" sends a random event every 100 steps).

Another idea was random or fixed objectives. Objectives like "defeat enemy army that will arrive in 100 ticks" or "send 2000 food off to a foreign colony". The objects would come when called (ie "obj 4" for setting the objective as 4 or "obj rnd" for sending a random objective) or could be set to send one every time the previous objective is finished or at a fixed time (like 100 ticks). How intense the object is can be relative to some like your population or maybe how many buildings you have, so few people would be "build 5 turrets for defence by tick 300" while many people would be "get 10,000 common ore and 20 Acid Tigers sent off to a foreign colony". Lastly, by making them require to be full filled in certain time frame makes it like a challenge mode.

Anyways, I'll be quite now, but I think your thing is awesome, and I might make a simple .txt file with a bunch of pre set commands for people to try. Thanks Flashy!
I AM YOUR PET ROCK!!!!!!

Offline Flashy

  • Sr. Member
  • ****
  • Posts: 391
'distantnoise' - Eden/plymouth, Sandbox
« Reply #8 on: September 22, 2012, 02:07:57 PM »
Post 1)
Well thank you for the appreciation. And yes, this project was designed to be rather easily expandable and reusable. It's done by editing the main.cpp file as well as SetupInfo.cpp, which contains the SetupObjects function created by the Outpost 2 mapper. And as for having fixed spawn locations, that's rather easy. All you have to do is remove the Loc object from the list of commands and manually setting up spawn information in InitProc().

I'll see if can release a package later.

Regarding your suggestion, those should be possible, I'll look into that as soon as the next version is out.
~~~~~~~~~
Post 2)
Another update:
#->0.4-122
-Updated file "fl_file\do_save.txt"
-Added saveable command "time"
-Added command "start"
-Added command "stop"

Finally the time trigger infrastructure prepared since the first release comes into play: It automatically spawns groups, I think it will be very helpful. The "start" and "stop" commands reuse most of their code from "reset", along with it's format.
Additionally, I've released the source, it's available below the download link, you are free to recompile it with any map you like, with any modification you like.
Next item on the list are Spikes proposals

PS: Maybe I should mention that this system can only spawn up to 30 FightGroups, after that you have to kill some of them to free up space for new ones, or they just won't spawn.
« Last Edit: September 22, 2012, 02:13:10 PM by Flashy »
Praise the mighty light towers!!!

Offline TH300

  • Hero Member
  • *****
  • Posts: 1404
    • http://op3game.net
'distantnoise' - Eden/plymouth, Sandbox
« Reply #9 on: September 23, 2012, 12:54:06 AM »
Why don't you upload the source to our svn repository? That would make it easier for people to get the current version.

Offline Flashy

  • Sr. Member
  • ****
  • Posts: 391
'distantnoise' - Eden/plymouth, Sandbox
« Reply #10 on: September 23, 2012, 06:35:33 AM »
That was the first thing I have tried, but after reinstalling TortoiseSVN, it just didn't start, no matter what I did. I seem to have an issue with installing lately. On the other Hand, mIRC installs just fine, which doesn't help my in any way because we're not using IRC anymore.
« Last Edit: September 23, 2012, 06:36:27 AM by Flashy »
Praise the mighty light towers!!!

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
'distantnoise' - Eden/plymouth, Sandbox
« Reply #11 on: September 24, 2012, 12:25:01 AM »
I've noticed if you install a 32-bit version of TortoiseSVN in a 64-bit version of Windows, you won't see any of it's shell extensions. Which really makes sense when you think about it, but is perhaps a little unexpected. Is that perhaps the case?
 

Offline Flashy

  • Sr. Member
  • ****
  • Posts: 391
'distantnoise' - Eden/plymouth, Sandbox
« Reply #12 on: October 21, 2012, 06:59:14 PM »
Post 1)
I used the correct installer, that's not the Problem. I highly suspect that my antivirus just isn't getting along with Java and some executables lately.
~~~~~~~~~
Post 2)
Might as well say it now, I'll probably be unable to work on it for the next few days, let alone come here, but I'm sure there'll be something to show next week
~~~~~~~~~
Post 3)
Oh well, seems like I have lost the new files I've been working on, but that's no problem, I can just take the saved source from the uploaded version 0.4 and do it again. It just may delay the release of the next one for a few days. It's a little bit of an unlucky incident.
~~~~~~~~~
Post 4)
Ok, I might have been a little bit too optimistic with my guess, I don't have access to the right tools right now, and I'm not sure for how long. But sure as the almighty light tower's curiously angular light cone, I'll try to get back my old equipment and get it going again. Might as well see what I can do in the meantime.
Praise the mighty light towers!!!

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
'distantnoise' - Eden/plymouth, Sandbox
« Reply #13 on: October 22, 2012, 10:28:15 AM »
Quote
I've noticed if you install a 32-bit version of TortoiseSVN in a 64-bit version of Windows, you won't see any of it's shell extensions.
pun intended?



If you want, you have free use of any of my maps for additional sandbox games...if they still can be downloaded.
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline Flashy

  • Sr. Member
  • ****
  • Posts: 391
Re: 'distantnoise' - Eden/plymouth, Sandbox
« Reply #14 on: June 29, 2014, 09:17:49 AM »
Post 1)
YEP, I can finally say that I have my stuff back (what did I tell you about the light towers!), and was able to test whether I can still work with this.

#->0.4.1-136
-Updated file "fl_file\do_save.txt"
-Fixed memory leak under edge case low memory conditions
-Fixed slot selection interpreting 'all slots selected' as 'none selected'
-Added random meteors, vortexes and quakes
-Added saveable command "storm"
-Added saveable command "meteor"
-Added saveable command "vortex"
-Added saveable command "quake"
-Added saveable command "version"
-Added command "noop"

(For more info and a download link see the first post)

I think I fixed a hidden bug that caused the group slot selection to assume that you selected no one when you in fact selected all of them. I hope. It has been a while and I'm not sure about all these magic numbers I scattered in the parsing.
I also fixed a "memory leak" in case Outpost 2 uses more than 1.5 gigabytes of memory, which is oh so likely to happen.
On top of that, the old electrical storms that were on the map since the first update are now accompanied by tornadoes, New Terra quakes and meteor showers, which can be enabled and disabled with "start" and "stop".

Next up are Spikerocks' suggestions, after I have solved some private issues. Additionally I have to find out how to get the source to the SVN repository instead of the file forum.

@CK9 Thanks for the offer
~~~~~~~~~
Post 2)

Update, after what seems to be an eternity.
#->0.4.2-155
-Updated file "fl_file\do_save.txt"
-Added a very small selection of random events
-Added saveable command "evnt"

Hello, after a long while. Sorry for leaving this hanging, I kind of forgot about it one day.
So anyways, yesterday I was digging through my OP2 map stuff again and found the source for this mission, and apparently I already completed most of a primitive event system ages ago, so I went to it again and completed what I started. It's of course not near what I would call perfect as the selection of random events is laughably miniscule, but it should serve as the base for more. But I wonder, is anyone playing this map? Because I don't know how much work to invest into this. If no one disagrees, I'd like to put this on hold for a little time (definitely not as much as the last time) and turn attention to my next project, a mission called SpearPoint. It's a little swarm-clone that I wanted to present next week-ish.
I also reinstated the source code download link as I am too lazy to try SVN again, however I couldn't upload the files to the forum, is that normal?

And oh boy has my programming style changed over the years. For the better. And on that note, tell me if you find any bugs, as usual.

Ah the Nostalgia.
« Last Edit: June 29, 2014, 02:25:11 PM by Flashy »
Praise the mighty light towers!!!

Offline Drakmar

  • Sr. Member
  • ****
  • Posts: 251
Re: 'distantnoise' - Eden/plymouth, Sandbox
« Reply #15 on: June 30, 2014, 10:48:42 AM »
This looks great! I've been hoping for a colony map that I can just build up my base as large as I can.

As a future feature, it would be nice if it were possible to do a "Land Rush" styled version of this, as I prefer to choose my own colony site and set up. I'll be more than happy to do any bug tests.

Also, I have a server that I don't really utilize to it's fullest capacity, so I can set up a file host as an option so we can avoid the "mediashare" type of services.

Offline Flashy

  • Sr. Member
  • ****
  • Posts: 391
Re: 'distantnoise' - Eden/plymouth, Sandbox
« Reply #16 on: June 30, 2014, 02:18:34 PM »
Turning it into a land rush styled mission shouldn't be hard. I'll look into it tomorrow.

About the file hosting thing, If there won't be a reduction of the forum file upload limits it would be nice.
But would it really be worth it, for a file that's not really downloaded all that often?
Praise the mighty light towers!!!

Offline Drakmar

  • Sr. Member
  • ****
  • Posts: 251
Re: 'distantnoise' - Eden/plymouth, Sandbox
« Reply #17 on: June 30, 2014, 09:47:21 PM »
I don't set arbitrary limits, so long as it's not abused, I have no issue with leaving it uncapped. And it still may be important, seeing as a lot of old attachments are no longer able to be downloaded since the forums conversion.

Offline Flashy

  • Sr. Member
  • ****
  • Posts: 391
Re: 'distantnoise' - Eden/plymouth, Sandbox
« Reply #18 on: July 05, 2014, 09:41:29 AM »
Well, I guess you already noticed that I updated with a land rush version. And seeing as the files are already uploaded on NTCS I linked to them now.
Praise the mighty light towers!!!

Offline Drakmar

  • Sr. Member
  • ****
  • Posts: 251
Re: 'distantnoise' - Eden/plymouth, Sandbox
« Reply #19 on: July 05, 2014, 10:35:55 AM »
I did, and I've already got a game started. :P