[MOD] Shields!

Started by Darker, March 25, 2014, 09:06:53 PM

Previous topic - Next topic

superpirson

Quote from: mkire on June 12, 2014, 08:54:36 PM
i have a suggestion/request: If it wouldn't be too difficult, do you think you could add an outline to the shield during placement that will tell me where the edges of the shield bubble are like what the sun lamp or the orbital trade beacon do?
does the mod work for you? Do you have the problem when the shield gets hit and the projectile stay in place, and continually damage the shield? if not, than we need to talk about how you pulled that off, because we are stumped. That bug is mod-breaking, and takes precedence over everything else, but to answer your question, there should already be a outline.
specs: mid2009 MBP OSX 10.9.3 NVIDIA GeForce 9400M 256 MB

Minato

#76
Hello, having a little problem here. When shield colapses, there is 15 (I think) seconds cooldown before it starts to recharge. When timer reaches 0 shield starts to charge, but then it fails again and cooldown starts again. Anyone having a clue about what's going on?
--------------------------------
Or is this that issue with seeds?

nmid

Trying this out. Will leave a review later.
I like how this game can result in quotes that would be quite unnerving when said in public, out of context. StorymasterQ

Battlemage15

This is an awesome mod and I am incredibly happy it will be making it into the core game.  Cheers all around.

Minato

Yea, but there is that problem with grass... I've solved it by cutting all the grass. But it's really embarrassing.

Girlinhat

Quote from: Minato on June 14, 2014, 04:59:51 AM
Yea, but there is that problem with grass... I've solved it by cutting all the grass. But it's really embarrassing.
It's not just grass.  My shields are far and enclosed by hundreds of tiles of concrete and still bork.

Minato

That's even more strange... Well, it's good mod, but it's broken as hell :D

nmid

Quote from: Anexgohan on June 09, 2014, 08:17:34 AM
Hi everyone,
Can someone with a bit more modding knowledge help me as I want to increase the Shield HP significantly and also the recharge rate along with it just a personal preference, as currently the shield just collapses within 5 secs of an attack.
I just need someone to give me directions how to go about it.
Thank you for any help provided.

I've tried doing much the same, but I've only managed to edit the starting costs + hp of the shield building.. However nothing makes a difference to the shield hp/power requirements.

I have made changes to both
Mods\Shields\Source\ShieldField.cs
Mods\Shields\Source\ShieldMod\ShieldMod\ShieldField.cs

as well as
Mods\Shields\Source\Building_Shield.cs
Mods\Shields\Source\ShieldMod\ShieldMod\Building_Shield.cs

but it makes no difference in game.

Any help or suggestions?
I like how this game can result in quotes that would be quite unnerving when said in public, out of context. StorymasterQ

mkire

Quote from: superpirson on June 13, 2014, 01:04:36 PM
Quote from: mkire on June 12, 2014, 08:54:36 PM
i have a suggestion/request: If it wouldn't be too difficult, do you think you could add an outline to the shield during placement that will tell me where the edges of the shield bubble are like what the sun lamp or the orbital trade beacon do?
does the mod work for you? Do you have the problem when the shield gets hit and the projectile stay in place, and continually damage the shield? if not, than we need to talk about how you pulled that off, because we are stumped. That bug is mod-breaking, and takes precedence over everything else, but to answer your question, there should already be a outline.

When i suggested the outline i had not yet tried to actually use a shield. What i was asking about is during placement: There is an outline of where the shield is after you've built it, but when you first set down the blueprint it is difficult to know where the shield bubble actually will be.

nmid

I installed Microsoft Visual C# 2010 to open up the project and I used it to make changes... BUT IT STILL DIDN'T WORK :(
I like how this game can result in quotes that would be quite unnerving when said in public, out of context. StorymasterQ

Architect

It's a shame Darker isn't gonna be hanging around RimWorld any more :( He was incredibly helpful to me as I'd never written anything outside of python before in my life.
Check out BetterPower+ and all its derivatives by clicking the picture below.

It adds many new methods of power generation and uses for it, as well as other things such as incidents.


superpirson

Quote from: mkire on June 15, 2014, 07:34:32 AM
Quote from: superpirson on June 13, 2014, 01:04:36 PM
Quote from: mkire on June 12, 2014, 08:54:36 PM
i have a suggestion/request: If it wouldn't be too difficult, do you think you could add an outline to the shield during placement that will tell me where the edges of the shield bubble are like what the sun lamp or the orbital trade beacon do?
does the mod work for you? Do you have the problem when the shield gets hit and the projectile stay in place, and continually damage the shield? if not, than we need to talk about how you pulled that off, because we are stumped. That bug is mod-breaking, and takes precedence over everything else, but to answer your question, there should already be a outline.

When i suggested the outline i had not yet tried to actually use a shield. What i was asking about is during placement: There is an outline of where the shield is after you've built it, but when you first set down the blueprint it is difficult to know where the shield bubble actually will be.
There is last time I checked, but frankly that does not matter, as the mod currently does not work due to the aforementioned bug. sorry.
specs: mid2009 MBP OSX 10.9.3 NVIDIA GeForce 9400M 256 MB

N-Tempest

confirmed. Shield is good for one use only before it starts to insta-kill itself...

Jaxxa

Quote from: nmid on June 15, 2014, 08:18:48 AM
I installed Microsoft Visual C# 2010 to open up the project and I used it to make changes... BUT IT STILL DIDN'T WORK :(

Are you then rebuilding the project to create the .dll file and moving that to the right place?

Not that it really matters until the bugs get fixed in this mod.

Jaxxa

#89
Hi Guys.
I spent some time and it looks like I have fixed the issue with the Shields continuing to take damage. (aparently it is too big to attach so I have uploaded it)
Download:
https://www.dropbox.com/s/hgsk7udqeyq13lk/Shields_Alpha4_Jaxxa_0.01.7z
or
https://mega.co.nz/#!RxRwSbKa!kSiOEYtMSqfi8rhUtgr3b6FR7VdSqJDjTAHUZ8X_XT0
Please have a look at this version and let me know if it fixes the issue for you as well.

It looks like the problem steamed from Find.Map.thingGrid.ThingsAt() continuing to return objects that had their Destroy(); function called. This caused the projectile to continuously collide with the shield, damaging and collapsing it as soon as it reactivated itself. I fixed this adding a check of "if (!pr.destroyed)" before the damage is applied so that the destroyed projectiles can not keep damaging the shield.

I also enabled the radius to show up while placing the shield generator and made a few small code changes that should not have any noticeable gameplay effect, but may increase performance slightly.

As far as I can tell on my machine it is working correctly.
If you try it out, please let me know how it goes.