Ludeon Forums

RimWorld => Mods => Unfinished => Topic started by: sstanes3 on November 29, 2017, 05:33:32 PM

Title: [B18] Cannons - Unfinished (need help with a bug)
Post by: sstanes3 on November 29, 2017, 05:33:32 PM
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
Title: Re: [B18] Cannons - Unfinished (need help with a bug)
Post by: SpaceDorf on November 30, 2017, 03:41:12 AM
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.
Title: Re: [B18] Cannons - Unfinished (need help with a bug)
Post by: kaptain_kavern on November 30, 2017, 03:48:54 AM
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
Title: Re: [B18] Cannons - Unfinished (need help with a bug)
Post by: sstanes3 on November 30, 2017, 02:12:58 PM
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.
Title: Re: [B18] Cannons - Unfinished (need help with a bug)
Post by: kaptain_kavern on November 30, 2017, 03:10:03 PM
The conversation I was talking about: https://www.reddit.com/r/RimWorld/comments/7faadi/im_a_rookie_modder_that_just_started_2_weeks_ago/dqamscv/

Exact same subject, that's why I thought it was you, sorry
Title: Re: [B18] Cannons - Unfinished (need help with a bug)
Post by: SpaceDorf on December 01, 2017, 06:50:51 AM
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.