[B18] Cannons - Unfinished (need help with a bug)

Started by sstanes3, November 29, 2017, 05:33:32 PM

Previous topic - Next topic

sstanes3

What is it?
Quite simply, it's a collection of cannons and some howitzers. The current build is balanced to be played with Toxictimewaster's Ultimate Survival Mod.

What needs to be finished?
-Textures
-Recipe cost balance
-Find a helpful modder who knows C#
-Fixing an annoying bug


What is this bug you speak of?
For some bizarre reason, even though I have coded in a shell item and designated it for use inside my cannons. The cannon seems to think it doesn't exist, giving me a message of "no unreserved shells for X"

Ok, why do you need someone who knows C#?
Currently the size of the turret cannot be changed to scale with the size of the base of the turret. Which makes it so a massive 3x3 turret base has a tiny 1x1 turret on top. I've looked into how to use vector2 from the source code (what drawSize uses) for this purpose but I'm not smart enough to do anything. If you know anyone who can help me with this please post a reply. (or if i'm stupid and just missed a post where someone already did this)

Here is my source code so you can look through it yourself. (The only turrets that work are 20mm-57mm so don't expect to be able try try out the bigger cannons.)

https://www.dropbox.com/s/iebgvf7pto53i7b/Cannons-v0.3-B18.zip?dl=0

To play with this mod you'll also need Toxictimewaster's Ultimate Survival mod here: https://ludeon.com/forums/index.php?topic=34750.0

SpaceDorf

Look at Rimsenals Security Pack for reference. It includes a direct fire cannon that can use shells.

The basic I remember from OhU's Dropship weapons is, that you have to define the Turret Base and Turret Head seperately and both have seperate size settings. You just have to match them.
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

kaptain_kavern

That's what I thought as well. And what I told to sstanes3 on Reddit (I think it was you, right?). But apparently it's not as simple anymore. I haven't checked myself though

sstanes3

Not sure what I did but I got the 152mm to work properly. Aside from there being two options for the same job but that's ok. I think it's something inside my child sections which are parented to BuildingBase. When I tie the 152mm to BuildingCannonBaseLarge (A modified version of BuildingArtilleryBase) it works fine, but not when I tie it to BuildingBase. It may be more than one section though that's giving me issues, I tried tying the 122mm-75mm to BuildingCannonBaseLarge and they don't work, so I'm going to keep trying but thanks for the replies.

Also for the Ohu mod.. where do I look? It's such a big mod I don't know where to start.

And as for Reddit, I don't have one ;) sorry but that wasn't me.

kaptain_kavern


SpaceDorf

In the ItemDefs Folder, under Weapons.
But I think you would be better off looking at the Rimsenal Security Pack, since it is allready updated to B18 and OhU is on Hiatus for the moment.
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker