Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
JankaW

Registered:
Posts: 47
Reply with quote  #1 

Hi guys. First post on the forums and new to Artemis so bear with me.

Situation:
- I played a couple of games on a con, got excited, and am now setting up an Internet-based international group for my friends. Have a campaign idea in my head
- The way the games will be run means that the mission scripts pretty much need to run on a vanilla installation of Artemis; mods to vesselData etc are not possible to distribute reliably without more headache than I am willing to put in
- I know computer programming though I am not a pro, and have worked with XML once or twice before. I think I got my head around the event-based control AML (is that the correct term?) uses.

Ok, so. What I am looking for is to write a script that I can use to simulate the universe I have in mind. I want it to be sandbox-ish, as in, 

1. players can arrive back to same place (calling them 'sectors' at this point, but this might change) and find the basic structures such as asteroids, nebulas, stations etc still there
2. a way to remember which stations, key NPCs etc have been destroyed or lost, so when players come back, the sectors are persistent
3. a way to generate enemies based on some parameters (some sort of 'status' variables of that sector at that moment, e.g. who controls it and how badly the war is going) without having to generate every enemy by hand
4. a way to insert a random mission to any of these systems
5. actual play without much GM input during it (I am quite fine with editing the scripts in between)

I looked at Xavier's Sandbox script, and if I get it correctly, it started out something like this, but has actually been developed to a totally different direction, making it current state a comprehensive GM tool that does not do much without GM input? That sounds awesome, but not what I am looking for (though I suspect having tried it my way, I might also change my mind just like he did?).

As I understand, point #1 is trivial with the mission script. I do not even need changing sectors during sessions, only between them, so I don't even have to do this fancy navpoint/jumpgate thing. I've fooled around with the mission script and have the basic "geography" of a couple of systems done already.

For #2 and part of #3, I've been thinking simply logging losses of key stuff and then editing the mission scripts between sessions would be easiest. I'll probably want some sort of version control but that's just a minor PITA to set up. Just to make sure: am I correct that there isn't any way for the mission script to read any sort of parameters from a separate file?

#3: the mission script does generate random numbers. Someone else but me has had to think about generating random enemies, and the invasion mode actually DOES this. Why cannot I find a code snippet for it? Am I blind or illiterate or something?

#4. Copy-paste?

#5. So what's the reason Xavier's gone for more GM control rather than more sandboxy? I think knowing it might convince me to just ditch my plans and use his script, which would be save me a lot of work...[wink]

leaola

Registered:
Posts: 268
Reply with quote  #2 
u can make random numbers and save then as x y and z, then if fleet count = 0 create bad guy at ur random x y z . cant see why u could not save a random # to 'fleet size'  and keep making clone bad guys till fleet = that size. and load  another random number x1000 plus an other random 1-3 to make random hull type numbers.
Captain

Registered:
Posts: 1,026
Reply with quote  #3 
The reason Xavier went for GM is that the mission script is used for the RP. If we want to run a simple mission it's easy to do. Then every other week or so we run a mission where the script has been edited. A GM still sits over and uses keys to change things in case something is to easy, hard, or a plethora of other reasons. This makes in game problems much easier to solve.
__________________
Captain USN Liberator

"When I lost my rifle, the Army charged me 85 dollars. That is why in the Navy the Captain goes down with the ship."
Fish Evans

Registered:
Posts: 383
Reply with quote  #4 
Hi,

Let me quickly introduce my self in the context of my experience I am one of the GM's for the TSN RP group and am typicaly the one that generates customized Missions every few weeks (I am hoping to release one of them to the comunity later today infact to help showcase the TSN RP to other groups).


Quote:
Originally Posted by JankaW

As I understand, point #1 is trivial with the mission script. I do not even need changing sectors during sessions, only between them, so I don't even have to do this fancy navpoint/jumpgate thing. I've fooled around with the mission script and have the basic "geography" of a couple of systems done already.



Yes nice and easy to do that, sounds like you are well on your way there

Quote:
Originally Posted by JankaW

For #2 and part of #3, I've been thinking simply logging losses of key stuff and then editing the mission scripts between sessions would be easiest. I'll probably want some sort of version control but that's just a minor PITA to set up. Just to make sure: am I correct that there isn't any way for the mission script to read any sort of parameters from a separate file?


For world shapeing events thats more or less what I do, editing some of the sectors to remove bases or replace them with debris, anything that in my mind would take a few weeks to replace.
for #3 I generaly have a Mission variable called stage that tracks what stage the mission is at and will generate traffic apropriotly (generaly named friendlys, ocationaly some critical enemys/customised fleets that need specific AI or scripting).

Quote:
Originally Posted by JankaW

#3: the mission script does generate random numbers. Someone else but me has had to think about generating random enemies, and the invasion mode actually DOES this. Why cannot I find a code snippet for it? Am I blind or illiterate or something?


The code in the invasion mode is hidden and posibly even not compatable with the scripting code, however you can make a whole selection of random enemy fleets. and then use the scripted random generarertors


// to generate a random value
<set_variable name="Traffic" randomFloatLow="0.0" randomFloatHigh="10.0" />


//then an event that has the logic similar to this

if Traffic = 3
then
set variable Spawn Fleet A = 1
set variable Spawn Fleet B = 1
etc...


you can also use variables as values in various arguemnets and perform math on them. so you can randomise the placement of fleets as well.

Quote:
Originally Posted by JankaW

#4. Copy-paste?

The above would also work with generating random missions rather then spawning fleet say it would spawn a freighter and a distress call and set a flag that the mission is active.


Quote:
Originally Posted by JankaW

#5. So what's the reason Xavier's gone for more GM control rather than more sandboxy? I think knowing it might convince me to just ditch my plans and use his script, which would be save me a lot of work...[wink]


well think about it. a Human GM can adapt to the play style, and create a wide variety of missions just by virtue of having the right tools, where as a scripted mission can be run once. with in the context of the RP it would be rather suspicions to have the same events each week (not to mention boreing!) and so its more important to have a good tool set that allows the GM's to challenge the players rather then a few running-on-rails scripts. An entrily automated script takes hours of work, particularly if its going to be an interesting one and then to run it a handful of times... where as the same amount of time creating GM tools, and a selection of systems to play in results in 100's of hours of possible gameplay. you just need to find a few people willing to GM.

As I said I customize the RP Sandbox every few weeks for something a little more unusual or that has elements that the sandbox doesn't or cant cater for currently. One of the worst recently took nearly 20 hours of editing to set up. Mind you the mission did run for about 3 hours and was highly enjoyed by the 30+ people who played it but even that required GM inputs in a few places (mainly so I could have some control over the duration sections took).  So I view it as time well spent. however spending hours and hours each week for an hour or two of game play is not necessarily possible or effective.

It also means I can take time off, or be sick and the community will still have something to play as long as we have someone that knows the GM controls.

Haveing said that... Xavior is slowly working on the Mission Mode for the Sandbox, Im rather hoping to be able to add one or two ideas I have to the Mission mode as well at some point but that for the future

JankaW

Registered:
Posts: 47
Reply with quote  #5 

I get the advantages of a GM (I am an experienced RPer elsewhere), and if the TSN RP community games were generally a little earlier, I'd join. [wink] Without going to detail, my intended use case is a rather limited-scope one; for a more general tool for running games I'd just run Xavier's Sandbox, I think. 

I am just wondering on the development of this, as it seems to have at some point been more of a simulation than RP tool. But it was probably community preferences and availability of GMs that drove it, if I understand you correctly, rather than technical difficulties? That's good news for me.

Some things you say don't quite get through to me. This is probably because I have some fundamentally wrong assumptions. I think I'll read what you said again after using part of today's scheduled playtesting session for firing up the TSN RP Sandbox and seeing what exactly it *does*.





ryleyra

Registered:
Posts: 3,214
Reply with quote  #6 
I use randomly generated terrain in my Fighter Mod, based on the BSG mod. There is even an example mission that removes all the fighter stuff, and just simulates Solo Invasion Mode. Download it and install it in a mission directory. You will have to create a folder for the mission with the same name, I did not include such a folder. (Since it was just an example)

Scripts that generate a static layout are fairly easy to define, just create a selection of objects and place them in appropriate locations. The problem with this is moving from sector to sector; Xavier's Sandbox basically has to put all sectors in one mission file, making it HUGE. It also has to come up with a way to "fake" moving from sector to sector.

I'm hoping that the War Server can eventually be tweaked to help with this problem. For instance, if the War Server could be assigned a Mission File to be loaded in each sector, then you will see the same environment in each sector when you return to it. Alternately the War Server might be modified to save a sector map to a file and reload it. You could then have a pre-generated map to use with either a Mission or an Invasion Mode game.

When you start talking about having terrain persist even if you DESTROY objects in the Mission, THEN you start talking about some complicated code. The War Server can do this, but since it's in development it probably wouldn't be useful here. And the information would only persist as long as the server was running. (Unless the sector could be saved to a file)

My recommendation would be to create a number of Mission files that each represent a sector. Place terrain in the sector as usual. Then, at the top of the file, declare a "flag variable" for each base. Generate the base in the sector depending on whether the flag variable is set. Then, in order to destroy bases, all you have to do is change the flag variable, you don't have to go in and edit the whole mission file.

You might then have flag variables for mission types. For instance, if you want a fleet of Kraliens to invade, define a flag variable for that, and generate them randomly. If you want more of scouting incursions over time, declare a flag for that. You want a border skirmish, declare that. Set whichever flag you want at the time and run the mission. You could even have bases added back over time, much like the War Server's build points.

The problem is that Mission mode and the other gameplay modes are entirely separate, it is very difficult to set up a random game on a static map. You will need to do a LOT of work to accomplish it. If you look at my Solo Invasion mission, you'll probably see that, it's very complex, with dozens of lines of code, just to generate one invasion. That's why Xavier's Sandbox runs in GM Mode, because he doesn't attempt to generate random missions, and static missions would be too repetitive.
ryleyra

Registered:
Posts: 3,214
Reply with quote  #7 
I will add that you can semi-automate the Mission Script by using GM commands that generate missions, not individual ships. For instance, you could set a key to spawn a whole fleet of enemies at the currently selected location and send them into battle. The enemies generated could be random, subject to the strength that you want that fleet to be. (In other words, you could generate 4 Krailens and a random support ship as a typical fleet from the Solo Mode)

Don't forget when you generate enemies you can use keys. "enemy support" will generate either a Arvonian Carrier or a Torgoth capital ship.

Another thing I have not tried is using a "seed" to generate a random map. Then you don't need a separate Mission for each sector, you can just assign a value to the seed, and the same sector will be generated each time. This would probably be useful with Xavier's Sandbox, but I think he would prefer to manually design each sector rather than trust in a random placement. Also, I'm not sure Artemis's RNG can even be seeded.

JankaW

Registered:
Posts: 47
Reply with quote  #8 

I think I will prefer manually designing the geography, too.

Flagging for the existence of stations and enemy/neutral activity probably works; I was thinking whether that could be it, and your answer confirms it. I have no problems with modifying flags etc between sessions, as long as I make it very clear for myself where the flags are in the code. My games will probably not have a functionality for players to change sectors during a session (feature of the backstory, conveniently [wink]), which helps.

Otherwise, spawning fleets by strength at random and using keys, looking into it, yes, I think those will do what I want, more or less, with a suitable GM interface and some timer magixc. (I have a weird love for simulation coding, which helps here. Concurrent timers are such a wonderful way to shoot yourself in the leg.)

Thanks for the help!

For easy functionality, I probably want to have some GM emergency overrides, and the spawn functionality would be same for each sector. I am thinking of putting all sectors in one massive file, and letting GM select sector at start of play, rather than copypaste functionalities to many files. Is my thinking there sane?

I'll let you know about my project and its progress at some point. 

Nighthawk

Registered:
Posts: 141
Reply with quote  #9 
when it comes to sandbox-ness, what you truly want is space.... expanse.... in other words, room to do things on.

doesn't matter how complex your script logic is, if you run it on a tight space, sooner or later you will end up facing the same situation, all down to the same environment it happens in, making your open sandbox a closed repetition.

the larger the space you play in, the less likely you are to run into roughly the same situation of gameplay.
JankaW

Registered:
Posts: 47
Reply with quote  #10 

Yes, that is true. On the other hand, players tend to start to care about stations etc they have visited regularly - losing your standard docking point in Sector Foobar is a much bigger deal than losing station DS1 somewhere you've never heard of before. So it's really a balance.

Alexey_Andronov

Avatar / Picture

Registered:
Posts: 78
Reply with quote  #11 
For persistance between runs:

You can research into the "Log" action. It allows you to add text to the ".log" file that will reside in the mission folder.
One immediate idea I have is that have this log file be populated with your new "create space objects" node contents. So it works like this:

* Say, you have 3 bases created in the "Create Space Objects" event.
* When mission is over (either GM pressed an "end mission" hotkey, or players died or completed objectives), instead of immeidately doing "end_mission", you first trigger a "write log" event.
* This is actually six events, each triggered by some condition and a specific base being alive or dead
* If base is alive, a create statement is written to the log
* If base is dead, a commented create statement is written to the log
(Note that for this to work, you should never abort mission via server, but rather via GM console)

Then, you could write a simple program in any language of your choice that takes whatever there is in the log file (if it's filled) and replaces that predefined event's contents with it.
This program could be a wrapper for Artemis - you would run it to run Artemis server, and when server exits, it would do its work.
Or this program could just be ran alongside with Artemis and check the log file for some keyword that means the mission finished (say, "EOF" or "MISSION_COMPLETE" word as the last three letters of the file) and then do its work.

If you have multiple "Create space objects" events for multiple kinds of sectors, and GM chooses which sector to spawn when mission starts, then you can do the same, but you'd have to output some key (like, Event name) in the log, and read that with your program to modify the corrent event's contents.

This way, mission file is updated automatically, and if you want to reset your mission you can always open it and uncomment the create statements.

Of course, this may fail to work for numerous reasons, since this is just an idea I haven't tested. But I don't see why it would not work...
ryleyra

Registered:
Posts: 3,214
Reply with quote  #12 
That is awesome, Alexey. I bow to your guruness. [biggrin]
JankaW

Registered:
Posts: 47
Reply with quote  #13 

I did consider some automated parsing of log files, yes. 

But then I was like, noway I am going to do that. 

What I have now for persistence is a separate event that sets a bunch of variables that define states of the universe and a bunch of events that modify the basic maps etc based on that. Sectors have a 'threat level' that controls random encounter type of hostiles, gates between sectors have a variable for their state (open or not), etc.

This is still far from functional, but I am making progress, and will probably torture my test group with the first version of the first sector on Friday.

JankaW

Registered:
Posts: 47
Reply with quote  #14 

To reply to myself, after a couple of sessions of experience:

1) It is relatively easy to make random encounter enemies. I have an event that generates random co-ordinates (when the previous ones have been used) and another one that generates percentages and a timer of suitable random-length. When the timer ends, I create a hostile fleet at the co-ordinates, creating new enemies until the random percentage is below a certain threshold. I use general keys for the enemies, meaning they are drawn randomly from the hostile races and of random sizes, and the random stopping condition for each fleet means the fleets are of random sizes. The timer length is controlled by a "sector threat level" parameter, meaning the more dangerous the system is, the more hostile groups there will be.

2) Making completely away with the need of the GM is probably not going to work, for a long-term campaign. The AIs are occasionally so stupid that you seriously need a GM to poke them around, and sometimes the threats you put in the missions are not all that interesting or are TOO interesting and you want to fiddle with stuff on the fly. 

3) That is not a problem, because I have found I like GMing a lot. I am migrating towards having a scripted "episode" (as in, "season 1, episode 4") for each session + adjusting it on the fly.

4) I started building my sandbox through a story of Artemis and Intrepid exploring a new network of sectors. This works brilliantly well: each time they start a mission in a particular sector, I add stuff to it. This allows us to play while I develop the place, and me to experiment with what works before I plan the whole place.

5) For permanent changes (if players destroy stations, named NPCs etc) I will need to manually remove those things if they re-enter that sector in the same session, and edit the script in between of sessions. Not a big deal really; this happens seldom enough that when you have a GM, keeping notes is trivial.

Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.