RimWorld

RimWorld

69 arvostelua
Defensive Positions - Forked
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
Mod, 1.6
Tiedostokoko
Julkaistu
Päivitetty
404.814 KB
16.8. klo 16.08
23.8. klo 16.13
4 muutosilmoitusta ( näytä )

Tilaa ladataksesi
Defensive Positions - Forked

Kuvaus
Original Mod: Defensive Positions

WARNING
This mod is not a hop-in replacement for the other one, there were mayor changes in how things are handled by code. If you started a colony with the original, you probably should finish your colony with it.

Changes
  • Removed HugsLib dependency.
  • Changed graphics.
  • Positions are saved per map.
  • Removed Multiplayer Support (I deleted the class with most issues in multiplayer, so maybe it works on multiplayer right out of the bat, I don't know, I don't use that mod).

Description
Allows your colonists to remember their position during base defense. You can send off your colonists to their positions with a single click.

How to use
Set defensive positions for colonists
1) Draft your defenders and place them where you want them.
2) With your defenders selected, right-click the Defensive position button and select "Save defensive position".
Done. The selected colonists will remember their held positions.

Send colonists to saved positions
1) Select your defenders.
2) Click the Defensive position button (or press T).
Your defenders will be drafted and will run to their saved positions.

Advanced mode
Hold the Alt key and click the Defensive position button to switch between basic and advanced mode.
Advanced mode works exactly like Basic, but you have 4 positions to work with. Save a position using the right-click menu, then click the slot to send the selected colonists to the position they have been assigned under that number.
Pressing T is the same as clicking the first slot.

Squad hotkeys
Colonists can be assigned to squads for easier selection. To assign, hold the Ctrl key and press 1-9 on the numeric keypad to assign the squad to that key. Press the numeric key of a squad to select the squad members, press again to focus on the squad location.

Utility hotkeys
There are three other keys on the keypad for quick colonist management: press period to select all colonists on the map, undraft everyone by pressing divide, and press zero to send all colonists to their assigned defensive position.
In the Options > Mod Options window you can switch the Shift key from saving positions to queuing movement orders.

Special Thanks
Symbolic (a.k.a. UnlimitedHugs) - For the original code.
Captain ♥♥♥♥♥♥♥♥ - For a fix in the code.

License
Equally to the original version, this is a free and unencumbered software release into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any means.

You can check the source code on My Github Repository[github.com]
29 kommenttia
团长团子团 30.8. klo 11.36 
In the shortcut for selecting all colonists, ghouls cannot be selected. Is it possible to fix this?
GonDragon  [tekijä] 29.8. klo 18.16 
@Alexander Zagirov: I'll look at it tomorrow.
Alexander Zagirov 29.8. klo 14.37 
Pressing zero sends only colonists to their defensive positions. Can you include colony mechanoids too?
月空 27.8. klo 23.56 
Great job! It's functioning very well now.
GonDragon  [tekijä] 24.8. klo 15.23 
@Thetaprime: It patches some functions that exist only on 1.6 (The gravship's take-off and landing procedures). Maybe it works and just throw two red errors on load, maybe it doesn't work at all, can't say. If you want to know, you'll have to test it yourself. My suggestion: If you play on the 1.5, just use the original version with HugsLib. You don't gain too much removing HugsLib, I did it mostly because without the lib, the mod becomes easier to maintain or port to other version in the future.

HugsLib is not as bad for performance as many people say. I had to look at the code to port this mod, and it is quite well done. It's just that it hooks things in weird places, because it came from a time where the Vanilla rimworld code wasn't as friendly or convenient for modders. Currently, most if not all functions could be easily done with vanilla hooks.
Thetaprime 24.8. klo 12.59 
Any reason this fork wouldn't work with 1.5?
月空 24.8. klo 9.20 
That's great. I wish the personnel selection using Ctrl+number keys could also be saved.
GonDragon  [tekijä] 23.8. klo 12.24 
@月空: That's because you're landing on a new map, every map saves their own formations. That issue should be fixed in an Update later today, if a pawn have a position set on the ship, the position will move with him.
月空 23.8. klo 12.19 
The mod is great, but the formation resets every time the ship lands
GonDragon  [tekijä] 20.8. klo 5.23 
@Captain Shitface: Fixed, thanks! Although I put the fix directly inside the ViewingWorldMap, as it's also used in a another instance and i'll guess it needs the fix there too.

And about the hotkeys, if you mean all the instances about holding alt or control, all of those are now Event.current checks.