Home   Help Search Login Register  

Author Topic: RUG Campaign (beta 1.2)  (Read 4185 times)

0 Members and 1 Guest are viewing this topic.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
RUG Campaign (beta 1.2)
« on: 08 Feb 2009, 17:27:39 »
Edit: Beta 1.2 out, just minor fixes.

Hey all!

So we all know that persistent campaigns à la Resistance in OFP are damned cool: you have to keep your men and weapons handy and at good health, conserve your resources and otherwise act in a way that is quite different from your average single-mission/campaign modus operandi. I mean, what does it matter if your whole platoon is wiped out in one mission: they'll be right back in the next, eh? Not so in a persistent campaign! However, figuring out how the different saveStatus and saveIdentity and saveVar commands all work is not as easy as it seems.

So to ease the creation of, I'm sure, many new and nice persistent campaigns to be made, I've created a little script suite that should make each mission-editor's life a bit easier. It's ugly, it's pretty undocumented, but it works. Attached is the Beta 1, which I hope can be improved on pending suggestions by you good forum-browsers. It verifiably works, as you can see by the demo campaign (a three-mission 'campaign' that really contains a starting mission + two missions that loop around forever).

Features:
- Comprehensive campaign saving over and beyond default BIS saveStatus/Identity commands:
- Uses saveStatus/saveIdentity to retain each soldier's and vehicle's damage levels, ammo levels and identity: can also be used to persistently keep vehicles 'dead' and load them 'dead' in the next mission.
- Separate scripts save the units' position, velocity, vector up and vector dir (=you can save while flying in the air and load at the exact same speed/velocity/vector etc.)
- Group saving script saves each group member's vehicle and vehicle role (gunner, commander, in cargo etc.), and allows you to load it in the next mission exactly as you left it.
- Various options for how much to load whenever loading (with or without vehicles, at their previous position or somewhere else etc.)
- Uses global variables to store the data needed: you can have as many "saves" as you want to of your units! (in the demo campaign, save your group with radio 0-0-0, which corresponds to a different global variable, end the mission, and then use radio 0-0-9 to load your previous position/status! Note: some restrictions apply)

Setup:

It DOES require some know-how to set up properly, but if you can create a campaign description.ext, then you should be able to handle these scripts. The readme contains step-by-step instructions for how to apply it to your own mission: you can also  

Readme + more instructions available in the .rar. Just extract the RUG_Campaign_Beta1 folder into your Arma\Campaigns folder and it will show up with the rest of your campaigns. Enjoy!

(small note concerning personal weapons & their ammo: you will notice you have "reloaded" your gun after each mission IF you have the ammo for it: just drop all your extra mags to find out that saveStatus and loadStatus really DOES save each individual bullet. It also does this for the vehicles [and their fuel status, and localized damage etc. etc.])

Extra disclaimer: NOT tried with mods like HWM or ACE : use at your own risk! (I suspect it should work fine, except that the content of the rucksacks and the like might not compute. Untested, as noted).

NEW VERSION Beta 1.1:

Version History
Beta 1

-first release

Beta 1.1

- Fixed slight player-saving error that would sometimes prevent the player from being saved when inside a vehicle (just forgot a saveVar)
- Added some stuff to the demo campaign

Beta 1.2

- Fixed error in loadVeh.sqf which would prevent proper vectorUp and vectorDir from being applied (using setpos nullified them, so I just moved the setpos to happen before the setvectordirandup)
- Allow the loadGrp.sqf script to also load class "Static" objects (i.e, houses, sandbag walls..) without throwing up an error -> does not work very well with all objects that have the setpos getpos bug (=if you setpos the object on its own getpos repeatedly, it will move across the map), leading to the object becoming sunk into the ground, moving around, etc. Also does not play nice if the object is destroyed -> in most cases it will simply not show up (static objects like houses that cause ruins will not load the ruins, since they're not the same object any longer). In some cases like radio masts, where the destruction is animated, the building shows up in a destroyed state without problems.

Wolfrug out.
« Last Edit: 25 Jan 2010, 20:02:48 by Wolfrug »
"When 900 years YOU reach, look as good you will not!"

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: RUG Campaign (beta 1)
« Reply #1 on: 08 Feb 2009, 20:17:51 »
Hey how do I make this into a PBO file, because I Don't know how to use the PBO Cpbo thing..because this is a small campaign right to test your scripting?

Who's hyped for Arma4, long live Arma!

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: RUG Campaign (beta 1)
« Reply #2 on: 08 Feb 2009, 20:21:00 »
Oh right.

You don't need to pbo it: just put the folder in your ArmA\Campaign folder, and it will show up next to the official campaigns (and any other third-party campaigns you've got). Sorry for the confusion :D Will update first post.

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: RUG Campaign (beta 1)
« Reply #3 on: 08 Feb 2009, 21:12:14 »
So far while playing, it's good, it makes it challenging, now does this do this if you wanted to put as many guys as you want in your campaign?

One thing I didnt' like I played after the 2nd mission when my last guy died, he had to restart like a long ways away, is there anyway you can spawn it closer at base because it waists a lot of time?
Who's hyped for Arma4, long live Arma!

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: RUG Campaign (beta 1)
« Reply #4 on: 08 Feb 2009, 23:17:25 »
Well, this was just an example of how the scripts would work: it's not really supposed to be played  ;) As to 'spawning far from base', that was probably just you teamswitching into the dummy player due to your own guys all being dead. I'll just delete him in the future to prevent confusion.

As to what it does: as far as I know it will work for as many people and vehicles as you want it to, on any side, anywhere. If you want to edit it yourself, copy the missions in the RUG_Campaign_Beta1\Missions folder (SaveVarTest0.intro->SaveVarTest2.intro) to your own mission folder and open them up in the editor, and change the number of soldiers on your team in SaveVarTest0; they'll all persistently show up in the mission after that. :) If you want to add more empty vehicles that are saved, you'll find in the Alpha radio trigger that ends the mission the line RUG_EmptyVehs = [car1, tank1, heli1] call RUG_SaveGrp <- add the additional empty vehicles to the array of car1 etc., and they too will be persistent. Just remember to copy the end trigger to all three missions, or it won't work :)

For more groups, just follow the instructions in the readme; for future demonstration versions I'll probably add an external script that does the saving, since that's probably easier to edit and get an overview over, but curently it's all happening inside triggers and the like. :)

As mentioned: it's not a REAL campaign, just a demonstration! Break some cars, flip some choppers, shoot some friends in the leg and check out da persistance, yo.

Edit: V.1.1 released, fixed slight bug with player-in-vehicle sometimes not being saved. Also added a bunch of stuff to the demo mission to prevent confusion and such. Who is saved and who is not is now determind in an external script (RUG_Campaign_EndSave.sqf) which is perhaps a bit easier to modify if you want to ;)

You can also use radio 0-0-0 to save your group right at the start of mission 0, and if you find yourself getting killed, just use 0-0-9 to reload the group as it was when you saved it. Will not work with you inside a vehicle (because it's not really saving or loading you), but anyway.


Wolfrug out.
« Last Edit: 09 Feb 2009, 19:31:44 by Wolfrug »
"When 900 years YOU reach, look as good you will not!"

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: RUG Campaign (beta 1.1)
« Reply #5 on: 16 Feb 2009, 00:19:50 »
Isnt this ready for submission?

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: RUG Campaign (beta 1.1)
« Reply #6 on: 16 Feb 2009, 00:37:30 »
In principle, yes. I might update it at some point to make the group loading/saving actually load a GROUP rather than an array of units, and also remember group names and allegiances etc. (basically allowing you to blanket a whole map with an Anybody trigger and save everyone, and then load them again with their vehicles and groups and everything remembered), but that might be for later. Much later  :no:

Feel free to upload.

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"