[MOD](Alpha 9) Fortifications! (v4.0)

Started by Headshot, April 01, 2015, 09:05:08 PM

Previous topic - Next topic

Headshot

Fortifications! (just one at the moment)

Description:
First, this is my first mod--ever, and so it's super simple at the moment. The game had a lack of obstacles to impede attacking forces, and so I made a simple mod that introduced "Wooden Stakes" that take 3 wood to build and have 30 health. Their sole purpose, in their short lives, are to block off access points using a low cost semi-realistic alternative to walls.

I don't quite know what kinda barrier/fortification to make next, so please suggest and I'll see if I can get it done  :)

These are the two current sprites, thanks to apljee for making the second  ;D

^the current version of the texture.

Author/Mod Team
Headshot - Creator
apljee (created barricade sprite, thanks)

Download

or
Dropbox link: https://www.dropbox.com/s/9lipob8vyaoqe72/FortificationsV4.0.rar?dl=0

Changelog:
V4:
- Made pawns able to see through the fortifications
- Changed the sprite for the stakes
- Stakes can now only be built from wood
- Added the Barricade structure thanks to apljee for the sprite (built only using metal)
V3:
- Added anti-aliasing to the texture to make it look better
- Changed cost to walk across to a much higher value, the pawns now take a while to cross
- Added the "Stuff" system, the stakes can now be made out of Metal and Wood
- Added a sub folder with the original sprites
- Changed name to "Stakes" and becomes prefixed with the material used, i.e. Wooden Stakes, Iron Stakes, Gold Stakes

V2:
- Made the black outline on the texture thicker
- Moved wooden stakes to the "Security" tab
- Made the wooden stakes passable, but with 99 movment cost

V1:
- Release


How to install:
- Unzip the contents and place them in your RimWorld/Mods folder.
- Activate the mod in the mod menu in the game.
- Post any comments or concerns or critique

apljee

Alpha 19? But in all seriousness, I'll try to give this a go.

Nimbian

Welcome to Moding Headshot!

Downloading now and I'll give it a shot tomorrow

although honestly wooden stakes should slow characters not stop them, (well depending how there set up but we already have wooden walls) and would likely be more useful that way anyway. In Medieval times wooden stakes were used to stop Calvary from charging. But a person could climb through it.

If you wanted to continue the theme thou you could make your Stakes out of "Stuff" so it could be made of Wood, or Metal




Headshot

#3
Quote from: Nimbian on April 01, 2015, 11:51:35 PM
Welcome to Moding Headshot!

Downloading now and I'll give it a shot tomorrow

although honestly wooden stakes should slow characters not stop them, (well depending how there set up but we already have wooden walls) and would likely be more useful that way anyway. In Medieval times wooden stakes were used to stop Calvary from charging. But a person could climb through it.

If you wanted to continue the theme thou you could make your Stakes out of "Stuff" so it could be made of Wood, or Metal

Oh thanks a bunch :) My initial intent was to make it slow to get through and possibly cause damage, but passable yeah; however, I couldn't figure out how to implement it. Tonight I got it passable, with 99 "cost" to walk through. I also just started exploring the "Stuff" system when looking into also making a wall with a firing port built into it, and I don't quite get it.

Is there a example or tutorial on how to set it up somewhere?


Quote from: apljee on April 01, 2015, 09:18:10 PM
Alpha 19? But in all seriousness, I'll try to give this a go.

Hehe, a quickly amended typo, but I'm going to stick with it being an April Fools joke ;)

apljee

Quote from: Headshot on April 02, 2015, 12:10:24 AM
Tonight I got it passable, with 99 "cost" to walk through.

As in -- your walk speed will be slowed down from 100 to 1, or as in something I'm not sure of?

Headshot

Quote from: apljee on April 02, 2015, 04:49:39 PM
Quote from: Headshot on April 02, 2015, 12:10:24 AM
Tonight I got it passable, with 99 "cost" to walk through.

As in -- your walk speed will be slowed down from 100 to 1, or as in something I'm not sure of?

Uhm... I think so, here's the code:

<pathCost>99</pathCost>
<passability>PassThroughOnly</passability>


I'm not sure how the pathCost works, and with it set to 99 they still pass through too quickly for what I want, so next I set it to 200 and they took forever.

As I understand it, it's not a percentage, but instead affects the time it takes for the pawns to step onto the next tile. I've set the cost to a speed I like, and once I get the stuff system implemented I plan to increment the cost of walking through based on the material used to build it.

The AI seems to calculate the cost and often walks around them, to get around it encase the area your planning to protect.

Nimbian

lol a spike strip!

I know so little about XML and C# programming and only generalities of Rimworld Modding, but If you do use the Stuff system then you should be able to have it auto assign Movement cost via a variable which in turn is based on market value of the material. then you would only need two Icons, one for when the Spikes are Wooden and the other when its Metallic?

one of these days I'll actually have to sit down and teach myself basic XML and C# so I can at least offer more meaning full advice.


Actually now that I think about it, if you could make it have two states powered and un-powered then you could have a pop-up spike strip that slows your enemies from getting too close to your base, but could turn it off when its time to "chase those darn kids" off your lawn.

Headshot

Quote from: Nimbian on April 03, 2015, 01:24:52 AM
lol a spike strip!

I know so little about XML and C# programming and only generalities of Rimworld Modding, but If you do use the Stuff system then you should be able to have it auto assign Movement cost via a variable which in turn is based on market value of the material. then you would only need two Icons, one for when the Spikes are Wooden and the other when its Metallic?

one of these days I'll actually have to sit down and teach myself basic XML and C# so I can at least offer more meaning full advice.


Actually now that I think about it, if you could make it have two states powered and un-powered then you could have a pop-up spike strip that slows your enemies from getting too close to your base, but could turn it off when its time to "chase those darn kids" off your lawn.

I got the stuff system worksing, and the way it uses sprite is simple as heck.

Simply, you make a white and grey image, and the game colours it based on the material selection. All I had to add to the code was:
<stuffCategories>
<li>Metallic</li>
<li>Woody</li>
</stuffCategories>


There's a stone option as well, which I didn't enable--but if you guys want I could.

I'm going to prioritize trying to get the different material types to do different speed debuffs, other than that I made a new sprite and everything is working how I like it.

Once I figure out the different speed settings, I'll work on a powered "pop-up" version, because that sounds cool.

Thanks guys!

apljee

Quote from: Headshot on April 03, 2015, 12:55:05 PM
Quote from: Nimbian on April 03, 2015, 01:24:52 AM
lol a spike strip!

I know so little about XML and C# programming and only generalities of Rimworld Modding, but If you do use the Stuff system then you should be able to have it auto assign Movement cost via a variable which in turn is based on market value of the material. then you would only need two Icons, one for when the Spikes are Wooden and the other when its Metallic?

one of these days I'll actually have to sit down and teach myself basic XML and C# so I can at least offer more meaning full advice.


Actually now that I think about it, if you could make it have two states powered and un-powered then you could have a pop-up spike strip that slows your enemies from getting too close to your base, but could turn it off when its time to "chase those darn kids" off your lawn.

I got the stuff system worksing, and the way it uses sprite is simple as heck.

Simply, you make a white and grey image, and the game colours it based on the material selection. All I had to add to the code was:
<stuffCategories>
<li>Metallic</li>
<li>Woody</li>
</stuffCategories>


There's a stone option as well, which I didn't enable--but if you guys want I could.

I'm going to prioritize trying to get the different material types to do different speed debuffs, other than that I made a new sprite and everything is working how I like it.

Once I figure out the different speed settings, I'll work on a powered "pop-up" version, because that sounds cool.

Thanks guys!

Fortifications that look like that would make more sense looking as stone and wood rather wood and metal.

Headshot

Apljee, the reason I was hesitant was that to make a "stone poll" with sharp point would be almost impossible?

I'll happily add it in, it's as simple as adding <li>Stony</li>  ;D

apljee

Quote from: Headshot on April 03, 2015, 01:18:44 PM
Apljee, the reason I was hesitant was that to make a "stone poll" with sharp point would be almost impossible?

I'll happily add it in, it's as simple as adding <li>Stony</li>  ;D

But still, in mind it'd be pretty weird to have things that look like that be made out of plasteel. Perhaps you should use something more like...



?

Headshot

Quote from: apljee on April 03, 2015, 01:56:07 PM

But still, in mind it'd be pretty weird to have things that look like that be made out of plasteel. Perhaps you should use something more like...



?

Yeah, that looks great. I understand what you mean. There isn't a way to make diffrenet sprites based on the material is there?
Oh, Is the sprite an offering I can use  :P ? or is it just a example for something similar.

apljee

Quote from: Headshot on April 03, 2015, 04:43:05 PM
Quote from: apljee on April 03, 2015, 01:56:07 PM

But still, in mind it'd be pretty weird to have things that look like that be made out of plasteel. Perhaps you should use something more like...



?

Yeah, that looks great. I understand what you mean. There isn't a way to make diffrenet sprites based on the material is there?
Oh, Is the sprite an offering I can use  :P ? or is it just a example for something similar.

Yeah, you can use it, why else would I make it? :p

Headshot

Quote from: apljee on April 03, 2015, 05:03:30 PM
Yeah, you can use it, why else would I make it? :p

Sweet thanks, just wanted to make sure lol  ;D

Nimbian

Quote from: apljee on April 03, 2015, 01:02:42 PM
Fortifications that look like that would make more sense looking as stone and wood rather wood and metal.

maybe but then Rimworld is and has always been about using available materials and if Headshot gets the Movement penalty based on the Material then it offers a trade off. Also historically Stone "Spikes" where primarily used as tank traps during the world Wars eras, using Concrete but even (Especially really) those used steel to reinforce them. Stone by itself lacks tensile strength, but has enormous compression resistance.

also looking into XML so far its still French to me! :)

So like French I can read it but lord help any one trying to understand what I write with it.