664914efa51ae

664914efa574c
1 Guest is here.
 

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

664914efa5c93ZylonBane

664914efa5d04
I can't imagine that not looking very silly.

664914efa6151unn_atropos

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

664914efa62bcvoodoo47

664914efa6310
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.

664914efa6440GuyFawkesGaming

664914efa6490
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?

664914efa65a5voodoo47

664914efa65ff
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 »

664914efa66f7GuyFawkesGaming

664914efa675e
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".

664914efa6893voodoo47

664914efa68f0
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 »

664914efa6b06GuyFawkesGaming

664914efa6b5b
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.

664914efa6c07ZylonBane

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

664914efa6ce4GuyFawkesGaming

664914efa6d2f
Hey, I said I've done programming before. Never said I was a pro.
Acknowledged by: JML
664914efa71ae
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:

664914efa7510ZylonBane

664914efa7579
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.

664914efa765bGuyFawkesGaming

664914efa76ad
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

664914efa790cGuyFawkesGaming

664914efa7990
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.

664914efa7a3cvoodoo47

664914efa7a95
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.

664914efa7b33voodoo47

664914efa7b7f
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

664914efa7cacDeu sex

664914efa7cfb
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).

664914efa7d9fvoodoo47

664914efa7e13
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.

664914efa7f29Deu sex

664914efa7f78
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:

An evil mega-corporation with 3 branches:
1 Guest is here.
It's NEW - have you got the message Chum!
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
664914efa8097