RimWorld
SRTS Expanded
 Este tema se ha marcado como fijo, por lo que probablemente sea importante
NECEROS  [desarrollador] 28 AGO 2019 a las 16:49
How to make your OWN ships!
First, you're going to need an idea for a ship, and some artwork to represent it. You can use one single image, or you can include north, east, and south versions like I have.

Honestly you only need to have one graphic image because of the fact that the ships always point north when they land, regardless of position.


Find this mod's folder, typically located under steam/steamapps/workshop/content/294100/1845423808

There are three locations you need to know about (all within the Defs folder):
- ThingDefs_Buildings contains 1 def per ship
- ThingDefs_Misc contains 3 defs per ship


<defName>SRTSMkII</defName> <defName>SRTSMkII_Incoming</defName> <defName>SRTSMkII_Leaving</defName> <defName>SRTSMkII_Active</defName>


All of the magic is in the first def. The three remaining defs are just graphics placeholder for the code to lift off and land the shuttles.

The only thing you should change in ALL of the defs is in this area:
<graphicData> <texPath>SRTSMk2</texPath> <graphicClass>Graphic_Multi</graphicClass> <drawSize>9</drawSize> </graphicData>

texPath: the graphic filename of the ship, located in the Textures folder. If you are using a Graphic_Multi (more on that below) make sure you don't include the _east, _north, etc. Just the base name of the graphic file.
graphicClass: This wants to know if you are using one graphic to represent your ship, or if you have an east, south, and north variant. If you want one single graphic use Graphic_Single. If you want to use directional graphics, use Graphic_Multi.
drawSize: This is how big the graphic should be drawn, and is independent from the actual size of the clickable building. All of my ships extend off the edge a little bit to make it look bigger.

For the three placeholder defs with _Active, _Leaving, and _Incoming, it's important they share the same exact name as the ship def, but with the extras added afterwards.

For example, if you name a ship Orca, the other defs MUST be named Orca_Active, Orca_Incoming, and Orca_Leaving.

====================================


Now that you know where and why, let me show you how.


Find the folder steam/steamapps/workshop/content/294100/1845423808 and right click 1845423808 and copy it into your clipboard. This will grab everything from SRTS Expanded.

Now, find your actual Rimworld mods folder: steam/steamapps/common/RimWorld/Mods

...and PASTE the folder you copied into the mods folder. Rename it whatever you want.

Open the folder. Delete all of the following from the new folder: .git, .gitattributes, Source, Assemblies, Languages, and Patches. Additionally, delete all of the artwork inside Textures, but leave the folder because you will need to put your own artwork in there.

Inside Defs, delete DesignationCategories, WorldObjectDefs, and ResearchProjectDefs. We don't need them.

Open Buildings_SRTSExpanded.xml and Things_SRTSExpanded.xml in your favorite text editor. I suggest Notepad++ or Sublime Text.

Inside you will find 4 sets of ships, all represented with 4 sets of defs each, as described before. Use these to reference and build a ship to your liking. All of the properties are pretty self explanatory, but as always I am happy to help and answer questions here.

Things to note
You don't need a research project to unlock your ship, but you are more than welcome to. Just copy how I did my research projects, and make sure to set the <prerequisites> to point to the previous research that is needed to unlock this one.

Using CP's Helicopters mod?: I highly suggest you change your <designationCategory> to Misc, otherwise you will need to edit the file under Patches folder to include your ship. This is important.

The <Mass> of a ship should be 2-3 times the combination between the ship's carry capacity and it's fuel reserve tank. If a ship has 1,000 kg carry and 1,000 L of fuel, it should theoretically have a mass between 4,000 kg and 6,000 kg. This only matters for immersion, not function.

Your ships MUST have the following code, but you are free to adjust the numbers as you see fit:
<comps> <li Class="CompProperties_Transporter"> <restEffectiveness>0.8</restEffectiveness> <massCapacity>4000</massCapacity> </li> <li Class="SRTS.CompProperties_LaunchableSRTS" /> <li Class="CompProperties_Refuelable"> <fuelCapacity>1600</fuelCapacity> <fuelConsumptionRate>0.8</fuelConsumptionRate> <targetFuelLevelConfigurable>true</targetFuelLevelConfigurable> <initialConfigurableTargetFuelLevel>800</initialConfigurableTargetFuelLevel> <fuelFilter> <thingDefs> <li>Chemfuel</li> </thingDefs> </fuelFilter> <consumeFuelOnlyWhenUsed>true</consumeFuelOnlyWhenUsed> <autoRefuelPercent>1</autoRefuelPercent> <showFuelGizmo>true</showFuelGizmo> <drawOutOfFuelOverlay>false</drawOutOfFuelOverlay> <drawFuelGaugeInMap>false</drawFuelGaugeInMap> </li> </comps>

ComProperties_Transporter indicates how much of anything you can carry. Don't change restEffectiveness.

SRTS.CompProperties_LaunchableSRTS is REQUIRED BY ALL SHIPS.

CompProperties_Refuelable controls how much fuel you can carry and how efficient the ship is at flying.


Lastly, you will need to edit your About.xml and Preview.png files in the About folder. These are very easy to understand, and I'm happy to explain to anyone.

AS ALWAYS: Make sure your load your brand new mod AFTER SRTS Expanded.



If there are any questions let me know!
Última edición por NECEROS; 28 AGO 2019 a las 20:20
< >
Mostrando 1-9 de 9 comentarios
peanutter 2 28 AGO 2019 a las 20:06 
Best dev support ever :steamhappy:
Sean 31 AGO 2019 a las 7:30 
BY THE EMPEROR
How to avoid GW doing me a C&D tho...
mattdanw 10 ABR 2020 a las 13:24 
Hi, I absoultly love this mod and its gone a long way to inspiring my own Star Trek Mod: Rim Trek. My next stage of development was to create a patch file to replace the ship textures you've created with my own Star Trek Shuttle craft. I've made all the textures and they look good in the game. As I've preserved you originial naming convention, I've been able to just place my files over your in your folder.

Where i've hit a hurddle is with the Patch file. When ever i load the game now it loads for a moment, but then i just get a black screen. Its like I've crashed the UI?

I was hoping that if i showed you what i've done you might be able to spot where i'm going wrong?

I've my patch folder in RimTrek/Patches/ThingDefs_Buildings

<?xml version="1.0" encoding="utf-8" ?> <Patch> <Operation Class="PatchOperationSequence"> <success>Always</success> </operations> <li Class="PatchOperationReplace"> <xpath>Defs/ThingDef[defName="SRTSSuperpod"]/texPath</xpath> <texPath>Things/Ships/Superpod</texPath> </li> </operations> </Operation>

I complete the line starting <operation class several times for each ship type and close the file with </Patch> But I just cant see what i'm doing wrong? If you could give any help with this i'd be beyond thankful as its driving me mad trying to spot my error.

Thanks SO much for just taking the time to read this.
Matt
NECEROS  [desarrollador] 10 ABR 2020 a las 13:52 
Please join our discord to talk with us directly! https://discordapp.com/invite/AvV7DT5




To answer you here, though, you're missing a <value> tag :D

<?xml version="1.0" encoding="utf-8" ?> <Patch> <Operation Class="PatchOperationSequence"> <operations> <li Class="PatchOperationReplace"> <xpath>Defs/ThingDef[defName="SRTSSuperpod"]/texPath</xpath> <value> <texPath>Things/Ships/Superpod</texPath> </value> </li> </operations> </Operation>
Última edición por NECEROS; 10 ABR 2020 a las 13:52
mattdanw 10 ABR 2020 a las 14:23 
You are an absolute hero Neceros, thank you for coming back to me so quickly. Unfortunately, I’m still getting the same black screen error. I’d actually noticed that little omission shortly after posting so had tried that fix already without luck.

I however noticed that you also removed the line <success>Always</success>. Which did yield a little progress. After trying to run the patch file with only the 1 operation (precisely as you sent over) about 5 or 6 times, the game did load, but gave me an error message:

Publicado originalmente por error log:

[RimTrek] Patch operation Verse.PatchOperationSequence(count=1, lastFailedOperation=Verse.PatchOperationReplace(Defs/ThingDef[defName="SRTSSuperpod"]/texPath)) failed
file: C:\Games\Steam\steamapps\common\RimWorld\Mods\RimTrek\Patches\ThingDefs_Buildings\RimTrek_SRTS_Ship_Patch.xml

Anyway I’ll get in touch over discord. Thank you immensely for your help. Fingers crossed I can get this resolved, but as I’ve been working on this mode for about 5 weeks straight, I’m going to get some sleep before work tomorrow and take a crack at it in the afternoon.
Many thanks once again, look forwards to speaking to you soon.
NECEROS  [desarrollador] 10 ABR 2020 a las 14:46 
Ah sorry it's because the defname for the superpod is "Superpod" there's no SRTS on it.
mattdanw 11 ABR 2020 a las 10:41 
Afternoon Neceros, i've set my self up on discord. Are you ok continuing the trouble shooting on here or would you prefer would you like me to move our chat to discord, should you still be willing to help that is? Regarding the defname. I've tried modifying it as you suggested but still getting the same error. Something else, I took the defnames straight from Buildings_SRTSExpanded file so i'm not sure what i'm missing.
mattdanw 11 ABR 2020 a las 12:19 
OK so slight update by reinstalling the game and deleting C:\Users\ME\AppData\LocalLow\Ludeon Studios i've got past the black screen issue. I'm still getting this error

"[RimTrek] Patch operation Verse.PatchOperationSequence(count=1, lastFailedOperation=Verse.PatchOperationReplace(Defs/ThingDefs_Buildings[defName="SRTSSuperpod"]/texPath)) failed
file: C:\Games\Steam\steamapps\common\RimWorld\Mods\RimTrek\Patches\ThingDefs_Buildings\RimTrek_SRTS_Ship_Patch.xml"


And i get the same error even if i've changed the defname to Superpod.
mattdanw 11 ABR 2020 a las 13:04 
Ok then, so I've finial realised that I don't need a patch file to replace the textures; i just need to place my replacement textures in my mod folder, in the precise location of where they are stored in your mod. Thank you SOOO much for all your assistance and thank you again for your brilliant mod!!!!
< >
Mostrando 1-9 de 9 comentarios
Por página: 1530 50