6648a107b8fb9

6648a107b973f
1 Guest is here.
 

Topic: SS2 Big Droid Immortality Protocol
Page: « 1 [2]
Read 11495 times  

6648a107b9d83ZylonBane

6648a107b9ded
I can't imagine that not looking very silly.

6648a107ba288unn_atropos

6648a107ba2e8
Looks cool.  :)
Can the droid fire it? Can you exchange them when they are broken? Different ammunition types?  :lordy:

6648a107ba39dvoodoo47

6648a107ba3eb
they are dummy guns, just to see how they would look attached to the droid. also, looks like I had some youtube vid playing in the background when recording.

6648a107ba523GuyFawkesGaming

6648a107ba570
So I take the dark scripting engine restricts the modifiable "tag" to weapon objects only. I see now why the repairman mod lists broken turrets as containers.
Anyways, not too bad voodoo. I was expecting much worse. Regardless, what if instead of guns attached to it's hands it had a discrete "access panel" dummy gun on it's back?

6648a107ba69evoodoo47

6648a107ba6e9
it's just the original script, which only handles weapons - so to be able to modify other objects, you would have to write a custom squirrel script that would do whatever you want to do with the droid or any other target object. not sure what do you mean by those broken turrets - they are containers (with loot), so they should be registered as such.

anyway, no extended functionality from my side anytime soon, as it will be years before I'll be able to do anything more complex in squirrel - I have no coding background, so trying to learn these things takes immense amount of time and effort.
« Last Edit: 08. May 2018, 19:11:44 by voodoo47 »

6648a107ba7ecGuyFawkesGaming

6648a107ba838
Ok, so it is modifiable, just complex. I'm no expert programmer, but I was wondering why you didn't just make npcs modifiable/hackable, then 'tag' turrets and droids so only they can be modified, and hacked ones at that. Never touched squirrel, I'm more into Python and HTML, but if it's more complex then it sounds I understand.

For the turrets, I was actually referring to the window that pops up when you select the upper half to repair it; the side says "container" rather than "security".

6648a107ba8fcvoodoo47

6648a107ba947
I have no idea whether it's more difficult - as I don't know any coding language, I don't have anything I could compare it to.

I actually have no idea why the rim on the repair interface says "container", will investigate a bit. //not fixable by simple means.
« Last Edit: 03. July 2021, 07:38:01 by voodoo47 »

6648a107bab59GuyFawkesGaming

6648a107babb0
I've managed to hack the repairman mod's 'turretheal.nut' script to allow droids to be repaired. It was pretty simple actually; their was a short "list" with only 2 entries; allow turrets to be repaired and allow guns. Adding the proper entries for the droids allowed them to be repairable:
Code: [Select]
                // maintenance droids
else if (Object.InheritsFrom(fixObj, "Maintenance")) {
hp = Property.Get(fixObj, "HitPoints");
maxHP = Property.Get(fixObj, "MAX_HP");
if (playerMaintSkill < objSkillRequired) {
addMiscText("WrenchierSkillReq", "Maintaining this device requires a skill of %d.", objSkillRequired);
}
else if (hp >= maxHP) {
addMiscText("WrenchierUnused", "Device already in good condition.");
}
else {
// repair droid 5 HP per point of maint skill (default droids have a max HP of 100)
hp += playerMaintSkill * 5;
if (hp > maxHP) {
hp = maxHP;
}
Property.SetSimple(fixObj, "HitPoints", hp);
consumeTool();
}
}
// security droids
else if (Object.InheritsFrom(fixObj, "Security")) {
hp = Property.Get(fixObj, "HitPoints");
maxHP = Property.Get(fixObj, "MAX_HP");
if (playerMaintSkill < objSkillRequired) {
addMiscText("WrenchierSkillReq", "Maintaining this device requires a skill of %d.", objSkillRequired);
}
else if (hp >= maxHP) {
addMiscText("WrenchierUnused", "Device already in good condition.");
}
else {
// repair droid 5 HP per point of maint skill (default droids have a max HP of 160)
hp += playerMaintSkill * 5;
if (hp > maxHP) {
hp = maxHP;
}
Property.SetSimple(fixObj, "HitPoints", hp);
consumeTool();
}
}
// assault droids
else if (Object.InheritsFrom(fixObj, "Assault")) {
hp = Property.Get(fixObj, "HitPoints");
maxHP = Property.Get(fixObj, "MAX_HP");
if (playerMaintSkill < objSkillRequired) {
addMiscText("WrenchierSkillReq", "Maintaining this device requires a skill of %d.", objSkillRequired);
}
else if (hp >= maxHP) {
addMiscText("WrenchierUnused", "Device already in good condition.");
}
else {
// repair droid 5 HP per point of maint skill (default droids have a max HP of 200)
hp += playerMaintSkill * 5;
if (hp > maxHP) {
hp = maxHP;
}
Property.SetSimple(fixObj, "HitPoints", hp);
consumeTool();
}
}
Don't know if it has any negative side effects or if I made any mistakes so you may want to check it.

6648a107bac5cZylonBane

6648a107bacb0
All that duplicated code because you don't know how to do OR in an if statement. Sigh.

6648a107bad49GuyFawkesGaming

6648a107bada7
Hey, I said I've done programming before. Never said I was a pro.
Acknowledged by: JML
6648a107bb1e9
All that duplicated code because you don't know how to do OR in an if statement. Sigh.
What about quickly simplifying the code so people in this forum can actually learn something by it? Having a code that works and having a simplified code that also works is super easy to learn from. :thumb:

6648a107bb47aZylonBane

6648a107bb4cc
Hey, I said I've done programming before. Never said I was a pro.
This is like someone trying to make toast, burning their house down, then claiming "I never said I was a pro!" Booleans in conditionals are barely one step up from HELLO WORLD. If you actually have Python experience, you should already know how to do this.

else if (Object.InheritsFrom(fixObj, "Turrets") || Object.InheritsFrom(fixObj, "Maintenance") || Object.InheritsFrom(fixObj, "Security") || Object.InheritsFrom(fixObj, "Assault")) {

There. Just modify one line of code from the original script.

6648a107bb593GuyFawkesGaming

6648a107bb5df
Considering the game didn't crash from my method, I'd say it's more like someone trying to cook an egg but not knowing what a spatula is and using their hands instead (imagine the screaming).  :P
Acknowledged by: JML

6648a107bb841GuyFawkesGaming

6648a107bb88c
After observing the hacked droids more, I've noticed one extremely annoying issue. There are times when a droid is being attacked but it will just sit there frozen and not attack it's enemy until it's finally destroyed. Not sure what causes this and it doesn't always happen, but wow. I'd also suggest making the droids able to see in the dark. It makes no scene that turrets can activate and attack you in dark places but droids can't, in addition to all the "infrared" messages in the security monitors. I still think making them modifiable would be a good idea but I can wait on that.

6648a107bb931voodoo47

6648a107bb97c
it  certainly would be possible to make all AIs ignore how much light is on other AIs. will maybe have a look once I have more time.

6648a107bba1evoodoo47

6648a107bba70
updated to 1.01, the mod is now no longer SCP exclusive. requires a game patched with SS2tool (NewDark v2.48+, NVscript loaded), should work with SCP, vanilla, Secmod, Alyamod etc.
Acknowledged by: JML

6648a107bbbc3Deu sex

6648a107bbc11
Yo, I've been digging this mod and it's really cool! However I may have one complain, could it be possible that the robots you repaired follow you a bit? They are kind of static otherwise.
Another minor thing, but while not everything requires the same skill level, everything costs 50 nanites to repair, could it be slightly less expensive for low tier, this for mid tier, and slightly more expensive for high tier? (something along those lines).

6648a107bbcbdvoodoo47

6648a107bbd08
I decided against follow as I think it would be too good (right now, they should just patrol their area). prices can be changed easily by literally anyone who can edit the dml with a text editor.

6648a107bbe25Deu sex

6648a107bbe72
I'll do that then, as for following I can totally understand the argument of robots being too good (even if their movements would be limited since they can't travel between loadings and can't use gravlifts), though I wish a middleground could exist.
I'll try to mod it out from the files though, just to see if it would be interesting.

-> damn I looked at the files, but reading them I can get a vague idea what is going on in there but I have 0 clue on how to script on SS2 :D I was expecting something like "FollowPlayer=FALSE" in the entity's parameters lol.
The cost values can be modified easily indeed though.
« Last Edit: 21. January 2021, 19:31:49 by Deu sex »

Your name:
This box must be left blank:

TriOptimum counter-terrorism consultant Rebecca ____ (Fill in the last name):
1 Guest is here.
Live like a Windjammer.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
6648a107bbf96