Ludeon Forums

Ludeon Forums

  • May 30, 2020, 01:59:36 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: [MOD] (Alpha 3F) Battle Formations (v1.0)  (Read 10109 times)

pawnstorm

  • Colonist
  • ***
  • Posts: 164
  • Refugee
    • View Profile
[MOD] (Alpha 3F) Battle Formations (v1.0)
« on: April 24, 2014, 10:57:27 PM »


Battle Formations
Now with lasers, banana bombs and exploding sheep!
(not really)
Description:
Allows you to save the positions of all your drafted colonists so you can make them all return to the exact same positions at a later time.
I also added the ability to manually order your colonists to eat or sleep, so while the raiders are staging you can make sure all your colonists are well fed and rested.

Download:
The download link is at the bottom of this post or here.

How to install:
- Unzip the contents and place them in your RimWorld/Mods folder.
- Activate the mod in the mod menu in game.

Important:
You can't use this mod on an existing savegame. You have to start a new game with this mod enabled and you can't disable the mod for that savegame afterwards.
Savegames started with Battle Formations v0.1 also won't work with the new version. If you really want to use this mod in one of your existing savegames you can easily fix this using the awesome XML manipulation tool XmlStarlet which you can download here.

To fix your Battle Formations 0.1 savegame to work with Battle Formations 1.0:
Code: [Select]
xml ed -P -u "//thing[@Class='BattleFormations.XPawn'][def/text()='Human']/@Class" -v "BF.PawnX" -u "//thing[@Class='BattleFormations.XPawn'][def/text()!='Human']/@Class" -v "Pawn" input.rim >output.rim
To add Battle Formations 1.0 to your vanilla savegame:
Code: [Select]
xml ed -P -u "//thing[@Class='Pawn'][def/text()='Human']/@Class" -v "BF.PawnX" input.rim >output.rim
To remove Battle Formations 1.0 from your savegame:
Code: [Select]
xml ed -P -d "//thing[@Class='BF.PawnX']/savedpos" -u "//thing[@Class='BF.PawnX']/@Class" -v "Pawn" input.rim >output.rim
If all this command line stuff scares you, just download XmlStarlet, get this batch file, make sure xml.exe and the batch file are in the same directory and drag and drop your savegame on the batch file. I do advise to keep the backup file, at least until some people have reported it all works as intended.

Notes:
- The easiest way to set up positions for your colonists is to just move them all into position once, select them all and click the "Save positions" button. The other new button in draft mode will make them all return to these positions.
- The options to manually order your colonists to eat or sleep become available when either food or rest drops below 50%. The way I intended it to work is when raiders are staging you can select all your colonists and click the eat or sleep button to make all colonists with food or rest levels below 50% fulfill their needs.

Credits:
Clker.com is where I got the images I used for the buttons
Haplo for his awesome PowerSwitch mod which I used as a template

Changelog:
0.1- Released
1.0- Changed it so it only affects human pawns, the eat and sleep buttons will be disabled if pawns are already eating or sleeping and tidied up the code a bit.

P.S. There won't be anymore updates for Battle Formations. If you're still using this, consider getting Vanilla+ instead.

[attachment deleted by admin: too old]
« Last Edit: May 19, 2014, 08:44:49 AM by pawnstorm »
Logged

JanBlair

  • Drifter
  • **
  • Posts: 31
  • Refugee
    • View Profile
Re: [MOD] (Alpha 3F) Battle Formations (v0.1)
« Reply #1 on: April 24, 2014, 11:37:06 PM »

This sounds awesome man! Will try
Logged

pawnstorm

  • Colonist
  • ***
  • Posts: 164
  • Refugee
    • View Profile
Re: [MOD] (Alpha 3F) Battle Formations (v0.1)
« Reply #2 on: April 24, 2014, 11:55:05 PM »

Thanks! Let me know if you run into any bugs or if you have any suggestions on how to improve it. I'd love to get some feedback on this, especially how people use it.
The way I intended it to work is when raiders are staging you can select all your colonists and click the eat or sleep button to make all colonists with food or rest levels below 50% fulfill their needs.
Saving positions and ordering your colonists to move to their respective positions should also work with all your colonists selected.
Logged

Kirid

  • Colonist
  • ***
  • Posts: 372
  • Resident Polemicist
    • View Profile
Re: [MOD] (Alpha 3F) Battle Formations (v0.1)
« Reply #3 on: April 25, 2014, 01:12:35 AM »

Oh my gosh this is awesome ;D just what I was wishing for. I thought it was too good to be true at first. I started a new game and played around with it in godmode for a bit, no errors and works as intended so far. I'm going to start testing out mods with it, then play a full colony.
Logged
You can't rollerskate in a muffalo herd

Celthric Aysen

  • Colonist
  • ***
  • Posts: 687
  • Lead Developer of RimTECH
    • View Profile
    • Deviant Art
Re: [MOD] (Alpha 3F) Battle Formations (v0.1)
« Reply #4 on: April 25, 2014, 01:53:02 AM »

This would definitely be very very very useful!
THANK YOU!
Logged
My DeviantART|E-Vehicles|Flebe's  Channel
"♫"Every people that i see i will never understand"♪"

pawnstorm

  • Colonist
  • ***
  • Posts: 164
  • Refugee
    • View Profile
Re: [MOD] (Alpha 3F) Battle Formations (v0.1)
« Reply #5 on: April 25, 2014, 02:00:35 AM »

Glad you're enjoying it :). On a sidenote, if you really want to use this mod in one of your existing savegames you could in theory open up the savegame in notepad and replace every instance of 'Class="Pawn"' with 'Class="BattleFormations.XPawn"' (remove the single quotes). You could probably also do the opposite to disable the mod, but you'd still have some saved positions in your savegame (which is probably harmless, but I haven't tested that).
Logged

Celthric Aysen

  • Colonist
  • ***
  • Posts: 687
  • Lead Developer of RimTECH
    • View Profile
    • Deviant Art
Re: [MOD] (Alpha 3F) Battle Formations (v0.1)
« Reply #6 on: April 25, 2014, 02:10:04 AM »

Glad you're enjoying it :). On a sidenote, if you really want to use this mod in one of your existing savegames you could in theory open up the savegame in notepad and replace every instance of 'Class="Pawn"' with 'Class="BattleFormations.XPawn"' (remove the single quotes). You could probably also do the opposite to disable the mod, but you'd still have some saved positions in your savegame (which is probably harmless, but I haven't tested that).
Awesome!
Logged
My DeviantART|E-Vehicles|Flebe's  Channel
"♫"Every people that i see i will never understand"♪"

Kirid

  • Colonist
  • ***
  • Posts: 372
  • Resident Polemicist
    • View Profile
Re: [MOD] (Alpha 3F) Battle Formations (v0.1)
« Reply #7 on: April 25, 2014, 02:28:28 AM »

I plopped it into a rimworld folder with 30 other mods, no problems so far. No conflicts with the AlphaMuffalo mod, my only pawn-adding mod. Since your xml just changes the <thingClass> of "BasePawn", I think anything loaded before may automatically get written over as a BattleFormations.XPawn?
Logged
You can't rollerskate in a muffalo herd

pawnstorm

  • Colonist
  • ***
  • Posts: 164
  • Refugee
    • View Profile
Re: [MOD] (Alpha 3F) Battle Formations (v0.1)
« Reply #8 on: April 25, 2014, 02:44:26 AM »

I expect that's how it works, yes. I considered only changing the class of human pawns, but I figured someone might add tamable pets some day and I want my mod to be ready for it :P. Like dogs that can haul and melee attack or something.
Logged

Killaim

  • Colonist
  • ***
  • Posts: 237
  • Refugee
    • View Profile
Re: [MOD] (Alpha 3F) Battle Formations (v0.1)
« Reply #9 on: April 25, 2014, 03:56:18 AM »

thank you for this mod
Logged

Celthric Aysen

  • Colonist
  • ***
  • Posts: 687
  • Lead Developer of RimTECH
    • View Profile
    • Deviant Art
Re: [MOD] (Alpha 3F) Battle Formations (v0.1)
« Reply #10 on: April 25, 2014, 04:01:01 AM »

BTW pawnstorm if you want me to make icons for your mod, tell me.
a good mod requires good textures ;)
« Last Edit: April 25, 2014, 04:12:46 AM by Blackjack1000K »
Logged
My DeviantART|E-Vehicles|Flebe's  Channel
"♫"Every people that i see i will never understand"♪"

pawnstorm

  • Colonist
  • ***
  • Posts: 164
  • Refugee
    • View Profile
Re: [MOD] (Alpha 3F) Battle Formations (v0.1)
« Reply #11 on: April 25, 2014, 04:13:02 AM »

BTW pawnstorm if you want me to make icons for your mod, tell me.
i good mod requires good textures ;)

Thanks for the offer! I think the icons I used look nice enough, but if you have any ideas how to make something that looks better I'd definitely appreciate it!
Logged

Celthric Aysen

  • Colonist
  • ***
  • Posts: 687
  • Lead Developer of RimTECH
    • View Profile
    • Deviant Art
Re: [MOD] (Alpha 3F) Battle Formations (v0.1)
« Reply #12 on: April 25, 2014, 04:20:55 AM »

BTW pawnstorm if you want me to make icons for your mod, tell me.
i good mod requires good textures ;)

Thanks for the offer! I think the icons I used look nice enough, but if you have any ideas how to make something that looks better I'd definitely appreciate it!
Alright'y then il give it to you tomorrow
Logged
My DeviantART|E-Vehicles|Flebe's  Channel
"♫"Every people that i see i will never understand"♪"

Architect

  • Colonist
  • ***
  • Posts: 764
  • Gaming, Modding, Chilling, Falling - My pass times
    • View Profile
Re: [MOD] (Alpha 3F) Battle Formations (v0.1)
« Reply #13 on: April 25, 2014, 06:09:58 AM »

Awesome man :D I'm so glad someone decided to make this. :)
Logged
Check out BetterPower+ and all its derivatives by clicking the picture below.

It adds many new methods of power generation and uses for it, as well as other things such as incidents.

keyes

  • Muffalo
  • *
  • Posts: 3
  • Refugee
    • View Profile
Re: [MOD] (Alpha 3F) Battle Formations (v0.1)
« Reply #14 on: April 25, 2014, 12:26:55 PM »

This is a great mod.  The next thing that would be cool to go with it is to have speakers, or flashing red lights that you can activate. Anyone near the lights or speakers go to their positions. 
Logged
Pages: [1] 2 3