Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Master Bucketsmith

#1
Outdated / [A15] MBS Double Sleeping Spot (13-09-2016)
September 13, 2016, 10:52:32 AM


Download link: https://www.dropbox.com/s/cpqjr88imqd0p2s/A15%20MBS%20Double%20Sleeping%20Spot%20v1.0.7z?dl=1
Steam Workshop link: http://steamcommunity.com/sharedfiles/filedetails/?id=763061053

Description:
Adds a double sleeping spot. It's magenta!
Now your lover pawns can sleep together on the floor!

Compatibility:
Should have no compatibility issues with savegames and other mods.

Current issues:
- None?

Credits:
- Ludeon Studios for the game and assets on which this mod is based

Short version of license:

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
"You can do nearly everything you want, but must credit the original author and redistribute it under the same license."
I'd totally wanna know what you made and how my work might have helped you! ;D

Changelog:
Version 1
   - Initial release

Screenshots:
#2


Download link: https://www.dropbox.com/s/xskg5igzuq51awm/A15%20MBS%20Faux%20Rock%20Wall%20v1.0.7z?dl=1
Steam Workshop link: http://steamcommunity.com/sharedfiles/filedetails/?id=760281834

Description:
Adds buildable walls that look like natural rock. Completely blends in, links with other natural and buildable walls.
Otherwise functions as a regular stone wall of the same stone type.
Takes slightly longer to build and costs 7 stuff per tile. (As opposed to 5 stuff for a normal wall.)

Compatibility:
Should have no compatibility issues with savegames and other mods.

Current issues:
- For some reason the game puts Jade in the same category as stone, so it's available as a material option.

Credits:
- Ludeon Studios for the game and assets on which this mod is based
- Forged_Hero for his idea here https://ludeon.com/forums/index.php?topic=25824.0

Short version of license:

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
"You can do nearly everything you want, but must credit the original author and redistribute it under the same license."
I'd totally wanna know what you made and how my work might have helped you! ;D

Changelog:
Version 1
   - Initial release

Screenshots:
#3
Help / Glower confined to some sort of range boundary?
September 08, 2016, 12:33:09 PM
I've been messing around with light sources in various ways and one thing I noticed was that if you set the radius of a building's glow property beyond 24, the light effect will get these hard abrupt lines where it will just cease to exist.
As if the light is being confined in an invisible box, of different sizes, depending on the set size of the glower.
I can't make sense of where this might be coming from.

Anyone any ideas?
#4
Help / [SOLVED] [C#]Creating Gizmos/UI buttons
September 03, 2016, 08:58:51 AM
All right so in my search for optimizing my spotlights, I've come a great distance (with the help of several people along the way).
Alas, I hit a concrete wall on the road in that I cannot stop the turret from running TryStartShootSomething and BeginBurst, since it is extended from Building_TurretGun.

Having almost given up on that route, I went to try and copy the entire vanilla Building_TurretGun and attempt to just alter that as a new thing class for my spotlights to use.
Unfortunately it seems there are two methods that get scrambled when decompiled. I've managed to get one through using a different decompiler, but GetGizmos is still a bother.
In my search through the forum and Google I find it's a common one to be a garbled mess when decompiled, because it's a compiler generated method, or something to that extend.

I've noticed some people offer a working version, but it's always related to the mod the OP is making, which isn't a turret.
I'm having trouble understanding how I could make one specifically for the (vanilla?) turret code.
I'm not even sure what it's supposed to do, since it's scrambled.

Does anyone have any idea what this is supposed to say or where I could look into fixing it?

ILSpy
[DebuggerHidden]
public override IEnumerable<Gizmo> GetGizmos()
{
Building_TurretGun.<GetGizmos>c__Iterator107 <GetGizmos>c__Iterator = new Building_TurretGun.<GetGizmos>c__Iterator107();
<GetGizmos>c__Iterator.<>f__this = this;
Building_TurretGun.<GetGizmos>c__Iterator107 expr_0E = <GetGizmos>c__Iterator;
expr_0E.$PC = -2;
return expr_0E;
}


dotPeek
        [DebuggerHidden]
                public override IEnumerable<Gizmo> GetGizmos()
                {
                    // ISSUE: object of a compiler-generated type is created
                    // ISSUE: variable of a compiler-generated type
                    Building_TurretGun.\u003CGetGizmos\u003Ec__Iterator107 gizmosCIterator107 = new Building_TurretGun.\u003CGetGizmos\u003Ec__Iterator107()
                  {
                \u003C\u003Ef__this = this
              };
                    // ISSUE: reference to a compiler-generated field
                    gizmosCIterator107.\u0024PC = -2;
                    return (IEnumerable<Gizmo>)gizmosCIterator107;
                }
#5
Help / [SOLVED][C#]Destroy check on parent/child?
August 31, 2016, 06:34:28 AM
Hey,

I've been tinkering with some code in relation to a mod that creates a custom turret.
So far, for the functionality, all code is dependant on BuildingTurret_Gun, which is a child (I think) of BuildingTurret.
When the turret changes target or simply has no valid target, the altered code successfully changes with it or destroys the spawned glower buildings.
The problem arises when the turret is destroyed, by the various means of destruction the game has.

By moving my destruction checks around within the code of BuildingTurret_Gun, I get various results whether or not the spawned glowers also get destroyed.
As far as I'm able to deduce this is logically sound; the checks are within the BuildingTurret_Gun, so once that is destroyed, so is the code for those checks to remove the spawned glowers.
I'm in need of some sort of check that says if the turret/turretweapon is destroyed, it's glower buildings should also be destroyed.
If I write a second class that works with BuildingTurret, I can't call for condition checks for it's child BuildingTurret_Gun can I? Since they're different classes?

I've learned a little bit about C# by now, but not enough to figure out where I need to look. Any ideas?
#6
Help / Alternative sound TurretAcquireTarget
August 21, 2016, 05:35:41 AM
Hey so,

For my spotlights, instead of it playing the sound of the spotlights to go off every damned time it fires, I went to seek out an alternative.
First, I changed the spotlights so they no longer fire overhead/like mortars, but like a regular turret that requires line of sight. (Makes sense!)
So now, they get the AcquiredTarget sound, just like the vanilla improvised turret.
Naturally, that would be the perfect way to have the Spotlight_go_on sound only play once per target!

I've tracked down this:
filepath: Mods\Core\Defs\SoundDefs\World_Oneshots_GunTurret.xml
<?xml version="1.0" encoding="utf-8"?><DefPackage-SoundDef>

  <SoundDef>
    <defName>TurretAcquireTarget</defName> 
    <eventNames /> 
    <maxSimultaneous>1</maxSimultaneous> 
    <subSounds>
      <li>
        <grains>
          <li Class="AudioGrain_Clip">
            <clipPath>Weapon/GunTurret/Status/Target_Acquired</clipPath>
          </li>
        </grains>     
        <volumeRange>
          <min>15</min>       
          <max>15</max>
        </volumeRange>
      </li>
    </subSounds>
  </SoundDef>

</DefPackage-SoundDef>


It describes the regular sounddef for TurretAcquireTarget. Problem is, if I change this and add it to my mod, it changes the sound for ALL turrets that call for TurretAcquireTarget, even the vanilla improvised turret.

So my question is; does anyone know how I could set my spotlights to selectively use an alternative clippath for TurretAcquireTarget without altering it for all turrets?
#7

Download link: https://www.dropbox.com/s/fgfk5z2rvtgbk0r/A15%20MBS%20Flares%20v1.2.7z?dl=1
Steam Workshop link: http://steamcommunity.com/sharedfiles/filedetails/?id=746136621

Description:
Adds a manned flare mortar and handheld grenades that light up the target area in a large radius.
Recommended to manually target both mortar and grenades, otherwise you will get a spam of flares to a point it's overkill.
Lit up area removes aiming penalty for pawns aiming at a target in the area.

Mortar: Fairly inaccurate at long ranges
Range: Entire map
Required research: Mortars
Cost to make: 75 stuff, 75 steel, 1 components

Flare shells (bill at machining table):
Required research: Machining
Cost to make per 5: 5 steel, 15 cloth

Grenade flare bandolier: Accurate within range
Range: 18 tiles
Required research: Machining
Cost to make: 50 steel, 125 cloth

Recommended:
Realistic Darkness by Willowisp for enhanced darkness.
Spotlights by me for combat range.

Compatibility:
Should have no compatibility issues with savegames and other mods.

Current issues:
- None? :D

Credits:
- Ludeon Studios for the game and assets on which this mod is based
- panggul_mas for donating his nearly finished version as meant as an add-on for Darkness Revamp (I incorporated bits and pieces!)
- Various sources for their contribution to code, inspiration and support

Short version of license:

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
"You can do nearly everything you want, but must credit the original author and redistribute it under the same license."
I'd totally wanna know what you made and how my work might have helped you! ;D

Changelog:
Version 1.2
   - Skipped version 1.1 because I'm that awesome :P
   - Changed textures to the deployed flares
   - Added grenade version
   - Added fance 'mote' effects in the shape of sparkles and smoke
   - Added a stuff cost to the mortar
   - Various other tweaks and fixes
Version 1.0 - Initial release

Screenshots:
Version 2.0

Version 1.0
#8


Download link: https://www.dropbox.com/s/ivethxtiwfa5i9l/A15%20MBS%20Spotlights%20v2.0.7z?dl=1
Steam Workshop link: http://steamcommunity.com/sharedfiles/filedetails/?id=744745312

All new version! Neatly follows target now!

Description:
Adds an automated spotlight that lights the target area up in a small radius.
When enemies come in range, the spotlight 'fires' and the target becomes lit, increasing the chance of hitting the target for your pawns and turrets.
It's got a range of 50 tiles, slightly further than any handheld weapon.
Uses the same clunky AI a vanilla improvised turret has.

Auto Spotlight:
Power draw: 50W standby, 550W active
Research requirement: Electricity, GunTurrets
Cost to make: 70 stuff, 80 steel, 2 components

Recommended:
Realistic Darkness by Willowisp for enhanced darkness.
Flare mortars by me for longer range light support. (Not updated yet!)

Compatibility:
Should have no compatibility issues with savegames and other mods.

Current issues:
- Manual version not functional yet.

Credits:
- Ludeon Studios for the game and assets on which this mod is based
- eatKenny for creating the original code (and textures?) as part of an obsolete version of his Turret Collection mod
- Thanks go out to Dieter, GHXX, skullywag, Rikiki, dubwise and others for their code submissions and feedback! (Sorry if I missed your name!)

Short version of license:

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
"You can do nearly everything you want, but must credit the original author and redistribute it under the same license."
I'd totally wanna know what you made and how my work might have helped you! ;D

Changelog:
Version 2.0
   - Removed CCL dependancy & features
   - Completely changed the backend code to this mod (almost) from scratch
   - Spotlights now follow their target as long as it is valid
   - Added glow effect around spotlight itself once light is on
   - Removed UI icon, reverted back to vanilla style
   - Added back in sound effect for when the light goes on
   - Added new custom texture
   - Reverted cost to now include stuff cost again (also includes option to build a wooden base!)
   - Code-wise, turret no longer fires - just targets at something
   - Cleaned up the XML files
Version 1.2
   - Added UI Icon so it shows the spotlight in the architect bar instead of just the base (wtf vanilla RimWorld)
   - Added the display radius for range once installed (not just during placement)
   - Removed "Spotlight On" sound until I can find a better solution
   - Reduced size of spotlights to 1x1
   - Reduced hit on beauty
   - Increased duration of light effect and cooldown of spotlight to 5 seconds
   - Changed cost to just steel - no more stuff
   - Changed passability of the invisible building that spawns the light radius to be standable (instead of pass through only)
   - Spotlights can now be placed under roofs (and thus in buildings)
   - Spotlights no longer explode when critically damaged
   - Spotlights now no longer fire overhead like mortars, but require line-of-sight like improvised turrets
   - Auto spotlight now also requires Gun Turrets research
Version 1.1
   - Added automated spotlight
Version 1.0
   - Initial release

Screenshots:
Version 2.0

Version 1.2 (size of spotlights changed, not size of light radius!)

Version 1.1
#9
So, vanilla or modded, there's two effects applied to the base of a turret or mortar.
One is the castEdgeShadow, the other I don't know.
And it's the other one that's darkening the graphic for the base. The shadow applies to the ground on the tiles it occupies.

I'm trying to figure that out because no matter how white I make the white parts of my edited file, the effect is applied and it turns out rather grey. It looks a bit odd to have that much of a difference between base and top!

Anyone any ideas where that effect comes from and how to disable it?
#10
Help / Fire seeking/mortar targetting with C#
August 12, 2016, 07:26:48 AM
Hey, so, I've made a little mod about a firefoam mortar. It works.

Now, I'm wondering if some C# whizzkid could figure out a way for an automated version to automatically seek fire and target it.
I'm not worried about the balancing of it yet, I just want to know if it's gonna be possible at all. :D
#11


Download link: https://www.dropbox.com/s/1qgtqlgnnnnpvvs/A15%20MBS%20Firefoam%20Solutions%20v1.6.7z?dl=1
Steam Workshop link: http://steamcommunity.com/sharedfiles/filedetails/?id=742216502

Description:
Adds a mannable mortar that requires craftable foam shell ammo and extinguishes fires from afar.
Upon detonation of the shell, it extinguishes fire in a medium radius.

Mortar:   
Required research: Mortars, Firefoam
Cost to make: 250 stuff, 100 steel, 5 components

Foam shells (bill at machining table):
Required research: Machining
Cost to make 1 shell: 10 steel

Compatibility:
Should have no compatibility issues with savegames and other mods.

Current issues:
- Targeting logic of a vanilla mortar is still in place. If you have a pawn still manning this mortar, it will target and fire at hostile creatures and pawns. I am not skilled in C# to change that behavior, I'm afraid. On the other hand, I wouldn't expect any player to use this mortar during raids unless they specifically want to put out a fire with it.
Alternatively, if you're also firing incendiary mortar shells at a target, this one could instantly take out the fire right after.

Credits:
- Ludeon Studios for the game and assets on which this mod is based
- Seikikai for making his thread. I didn't use his code, but I did use his wonderful idea and started work on his request!
- Reviire for making the code for the projectile and important advice

Short version of license:

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
"You can do nearly everything you want, but must credit the original author and redistribute it under the same license."
I'd totally wanna know what you made and how my work might have helped you! ;D

Changelog:
Version 1.6
   - Removed CCL dependancy & features (shellmaking no longer requires firefoam researched)
   - Reverted stuff cost to allow players different options in resources (250 stuff, 100 steel, 5 components)
   - Removed fixed UI icon to easily show which material is selected (this is why it only shows the base)
   - Various small tweaks and fixes
Version 1.5
   - Removed stuff cost to mortar, now costs 350 steel instead of 100 stuff + 250 steel (plus 5 components)
   - Added custom texture for the mortar base
   - Fixed minor glitch on the shell texture
   - Added icon for the architect bar
Version 1.4
   - Defined base Defs where needed. I learned something! :D
Version 1.3
   - Tweaked some values, changed colour scheme to something more fitting a fire extenguisher. Silly me! ;D
Version 1.2
   - Added craftable shells, imagery and uploaded to Steam Workshop
Version 1.1
   - Minor bug fixes and added custom texture for turret
Version 1.0
   - Initial release

Screenshots:

#12
Mods / [Request/Discussion] Cargo hauling equipment
March 10, 2015, 04:54:28 PM
Hey guys,

Personally, I like to play on the huge maps. It gives me more chance and freedom to pick a good spot to start my base.
Regardless of map size, I feel like I'm lacking some equipment to haul shit around.
I understand that colonists should be limited in the amount of stuff they can haul in one go, on their own, so here's what I was thinking about;

- Rucksacks and load bearing equipment. Former for materials, latter for weapons to free up hands for a tool(non related, different idea) or such.
- Wooden carts/sleds as early-game cargo hauler.
- Pallets, pallet jacks and forklifts as mid to late game options.
- Depending on what style the game is going, maybe some sci-fi themed hovering equipment that'd be able to do even more lifting.

I'm not asking for vehicles to transport around, because I feel even the ludeonicrous maps are too small for that.
It's just the constant sprinting around the map by haulers that I thought could use some love.
Maybe they would get to an area where they have multiple items they want to haul back, drop their equipment roughly in the middle, haul items to their equipment piece until it's loaded and then pick it up and return to base.
Wooden carts/sleds, pallet jacks and forklifts would need parking zones, much like the charging pods in Mechanical Defence 2.
Forklifts would be electrical and would have to be charged at their designated parking zones. (A battery start kit item could be available for when colonists fuck up and don't get back in time. They'd have to waste time and walk back to get the kit, back to the forklift, juice it up and only then be able to continue on.