The forum has been set to read-only mode. For community discussion and questions, head over to our Discord: https://discord.taleoftwowastelands.com

Some modding related questions...

General mod discussion and requests.
Post Reply
Question
Posts: 134
Joined: Thu Jul 16, 2015 5:33 am

Some modding related questions...

Post by Question » Sun Aug 16, 2015 8:21 pm

Im hoping someone might be able to help with these issues that i have been stuck with :




  • Non hitscan weapons deal no damage outside of VATS due to an engine bug. Ive tried using a script attached to the weapon to manually call the explosion, but the script will only fire if the weapon does at least 1 damage, and it needs to fire every time it hits something (such as firing a missile launcher at the ground). Does anyone have any ideas how to do this?


  • Sometimes the game incorrectly shows you as in CAUTION or DANGER mode even though there are no enemies around or they cannot possibly detect you (happens very often in old world blues for some reason). Is there a way to get it to reset to normal (through console commands, etc?)


    • There's another version of this bug where a detection event occurs but never expires for some reason, so enemies keep switching from normal to caution mode and back again infinitely. Happens most often when they discover a corpse and then keeps walking around, holstering and un-holstering their weapons as they switch from normal to caution and back again. They NEVER stop doing this. Using stopcombat, resetai and resurrect on the bugged actors does not work.




  • Anything related to how factions check for reputation loss from killing their members. Currently if you kill someone with no witnesses around and the kill isn't made with a silent weapon, the faction magically knows about it anyway, which is similar to how it was in Oblivion. I remember there was a oblivion mod that fixed it, but the faction system in NV is different and i can't find anything in the GECK that controls how the AI react to things like this.


  • Is there a way to get a script attached to a weapon or ammo to check to see who is using/holding it when it is fired? I've tried using GetSelf, GetContainer and GetOwner, but GetSelf only returns the weapon's target and the last two return <no name>.


  • Is there a way to mass update a whole bunch of NPCs/creatures, for example by changing their base health via a script or something? I mean yea, you could write a script and individually write down every single editor ID, but that would take forever, and i want to do it for every NPC at least.


  • What is the easiest way to replace a NPC/creature with another version of it when a particular quest variable or global variable is triggered? I can't see a way to do this using leveled lists unfortunately.


  • I changed fAutomaticWeaponBurstFireTime from 1 to 100, this makes the AI fire all automatic weapons in full auto mode (they usually on fire in bursts) till they need to reload. However this breaks the AI and now they refuse to equip flamers and incinerators if they have any other weapons, such as enclave hellfire troopers always switching from their heavy incinerators to their plasma defenders, even if the heavy incinerator does more DPS. Does anyone know why this is happening and how to fix it?


Mesh/Animation related questions :




  • The incinerator and heavy incinerator fire multiple shots in VATS, but only use 1 ammo each time. It seems to be something related to their mesh, because if i change them to use the gatling laser model, they work fine. Does anyone know what could cause this?


  • Some meshes seem to have weird targeting issues in VATS :


    • The Deathclaw Mother's VATS head area is the neck, instead of the head


    • Enclave scientists have 0% hit chance for their torso and les


    • Enclave soldiers in mark 1 advanced power armor have their left thigh highlighted when you target the head




Also i can't figure out why this script to make companions forceflee when their HP drops below 20% won't work...anyone have any ideas?


http://pastebin.com/YjF5G9yt


Ive tried setting the companion to brave confidence level but that doesn't seem to change anything.


You do not have the required permissions to view the files attached to this post.

User avatar
RoyBatty
Gary
Posts: 7742
Joined: Sun Apr 27, 2014 10:26 am
Location: Vault 108

1. Engine Bug

Post by RoyBatty » Mon Aug 17, 2015 8:47 am

1. Engine Bug


2. Engine Bug


3. Track Crime, also affects stealing (factions)


5. There are settings for health/level mult/calc, don't recall which ones right now


6. Replacing creatures could be done with script, but you'd have to change the spawn markers/hand placed creatures. Or spawn a new creature via a script attached to them, and then kill the original creature but that would be sloppy.


7. Deal with it


Image

Question
Posts: 134
Joined: Thu Jul 16, 2015 5:33 am

I know they are engine bugs,

Post by Question » Mon Aug 17, 2015 10:29 pm

I know they are engine bugs, im trying to find a workaround (like the gauss rifle impact damage bug).


If i turn off track crime, doesn't that make the whole faction not care even if you attack their members with witnesses though? Im trying to make it so that if there are no witnesses, then it's like a silent kill and it doesn't affect reputation.


Yea there are settings for health, but those only affect NPCs and don't touch their base health unfortunately.


Do you mean by replacing the spawn markers with leveled lists or something?


 



User avatar
RoyBatty
Gary
Posts: 7742
Joined: Sun Apr 27, 2014 10:26 am
Location: Vault 108

I believe you can attach a

Post by RoyBatty » Tue Aug 18, 2015 12:34 am

I believe you can attach a script to the projectile itself and use an OnHit block.


Yes, it disables tracking of murder/stealing. There's a mod that does what you are looking for somewhere on the nexus though, look for it.


I don't think we have any script commands that affect npc/creature base forms (maybe we do?), I've asked for some though.


Changing the templates for the creatures and having min/max level that scales with the player. Or calculating it yourself, and replacing all placed spawn markers and creatures/npc's in the world that you want to change. Either way it's a giant PITA and will be incompatible with nearly everything.


Image

A.Persyn
Posts: 12
Joined: Sun Mar 10, 2013 10:31 am

You may want to check out

Post by A.Persyn » Tue Aug 18, 2015 6:34 am

You may want to check out "Cover Based Stealth Mechanics" on Nexus. It alters detection in several ways.



For the NPCs/creatures, it depends on what types of changes you want to make. If you are just doing stat changes (higher health, DT, etc.), you can create a perk with the desired changes and then add that perk to the actor with a script. You can make a Form List of all the actors you want to change, loop through it using a script and add the perk to all of them at once. Likewise, if you want to replace one actor with a different actor (replace a human with a ghoul), you could use that same list/loop method but use PlaceAtMe to add the replacement and set the original to disabled.




Of course, the normal way is to hand place everything, parent one to the other, set one as "opposite of parent" and when you use a script or quest to disable the parent, the child is automatically enabled. ED-E and Moira are both replaced based on quest events.



The script sample you provided has three IFs but only two ENDIFs. That's not going to work very well.

 


EDIT: Companions are linked to player charisma. The higher the charisma the more brave/self-sacrificing they are. Probably hard-coded to override anything else.


 



User avatar
RoyBatty
Gary
Posts: 7742
Joined: Sun Apr 27, 2014 10:26 am
Location: Vault 108

Did not know the Charisma

Post by RoyBatty » Tue Aug 18, 2015 9:58 am

Did not know the Charisma thing, thanks for that.


Image

Question
Posts: 134
Joined: Thu Jul 16, 2015 5:33 am

RoyBatty wrote:

Post by Question » Sat Aug 22, 2015 3:34 am

[quote=RoyBatty]


 


I believe you can attach a script to the projectile itself and use an OnHit block.


Yes, it disables tracking of murder/stealing. There's a mod that does what you are looking for somewhere on the nexus though, look for it.


I don't think we have any script commands that affect npc/creature base forms (maybe we do?), I've asked for some though.


Changing the templates for the creatures and having min/max level that scales with the player. Or calculating it yourself, and replacing all placed spawn markers and creatures/npc's in the world that you want to change. Either way it's a giant PITA and will be incompatible with nearly everything.


[/quote]


Hmm, i tried using the onhit block attached to both the weapon and the ammo but the script wont even fire unless the projectile hits a target (the ground doesn't count).


I tried searching nexus for "faction" and "reputation" but couldn't find any mods that removed psychic factions that can track crime even if there are no witnesses. Do you happen to remember what it was called?


With the NPCs, i basically want to do two things :


-Set all NPC base health to 95 (same as the player).


-Make veteran legionnaires replace recruits at the same time that veteran NCR rangers/NCR heavy troopers show up at NCR locations, which happens after a particular quest is completed. From what i can tell, the quest enables markers that spawn the NCR rangers/heavy troopers. Obsidian didnt really care about the legion though, so most places like Nelson are permanently stuck with recruit legionnaires.



Question
Posts: 134
Joined: Thu Jul 16, 2015 5:33 am

A.Persyn wrote:

Post by Question » Sat Aug 22, 2015 3:43 am

[quote=A.Persyn]


 


You may want to check out "Cover Based Stealth Mechanics" on Nexus. It alters detection in several ways.



For the NPCs/creatures, it depends on what types of changes you want to make. If you are just doing stat changes (higher health, DT, etc.), you can create a perk with the desired changes and then add that perk to the actor with a script. You can make a Form List of all the actors you want to change, loop through it using a script and add the perk to all of them at once. Likewise, if you want to replace one actor with a different actor (replace a human with a ghoul), you could use that same list/loop method but use PlaceAtMe to add the replacement and set the original to disabled.




Of course, the normal way is to hand place everything, parent one to the other, set one as "opposite of parent" and when you use a script or quest to disable the parent, the child is automatically enabled. ED-E and Moira are both replaced based on quest events.



The script sample you provided has three IFs but only two ENDIFs. That's not going to work very well.

 


EDIT: Companions are linked to player charisma. The higher the charisma the more brave/self-sacrificing they are. Probably hard-coded to override anything else


[/quote]


Thanks, i will check out cover based mechanics.


Would i be able to use the script to change their base health though? I've had weird results with setav health (health not updating properly, not factoring in other modifiers, etc).


With the hand placing method, i would need to place two NPCs in the same spot right (for every NPC i want to "update")? One set as the parent, the other set as the child? Is there a way to place two NPCs in the exact same spot as dragging them around in the render window is pretty imprecise?


About the script, i copied and pasted it wrongly, my bad. It's actually got hte correct amount of ENDIFs (otherwise it wouldnt compile). I've tried testing with charisma 1 characters but no matter what, the forceflee simply doesnt work. Even if i use "addscriptpackage" with a script package to flee, the companion never flees when they hit the HP threshold. They just seem to completely ignore anything that is designed to make them non-sucidal....



A.Persyn
Posts: 12
Joined: Sun Mar 10, 2013 10:31 am

1) ModAV will add to the base

Post by A.Persyn » Sat Aug 22, 2015 9:16 am

1) ModAV will add to the base stat but ForceAV will replace the base stat. Both are applied before any modifiers. So Player.ForceAV CarryWeight 200 would actually be 225 if the player has the Hoarder trait. The same applies to NPCs.


2) It really depends on exactly how much control you really want/need. If you are changing vanilla NPCs then they would need to be replaced according to how they were placed by the devs. Custom NPCs can be added/replaced in different ways. If it's custom, the easiest solution would be to place a marker and then use a script/quest to decide what will appear on that marker and when.


Most NPCs are placed as markers which are usually place holders for leveled NPCs. A good example would be Legion/NCR hit squads. They both use the same markers but which one spawns depends on the player's reputation, which is handled by a script. Only one marker per enabled NPC is needed, so instead of eight markers (four Legion and four NCR) there are only four. An example can be seen near the bridge southwest of Grub n' Gulp.


Unique NPCs like Chet or Moira are placed by hand and replacing them with another unique NPC could use the Opposite of Parent method where both NPCs are placed in the cell but only one can appear at a time. An example of that would be the grazing brahmin east of Jury Street Station. There are four brahmin grazing prior to The Waters of Life Quest, but after the quest all the brahmin are dead and there are Enclave nearby. All of them are placed by hand, so they will appear exactly where the devs wanted them to be. The dead brahmin are posed in specific spots. All the changes are triggered by a single marker which is set as the parent. 


3) Companions are not normal NPCs. Once a NPC is set as Player Teammate they use some different code. It's the same reason you can shoot a companion and they won't turn hostile. If the "Flee not Combat" package doesn't work for companions, there are two possible ways I can think of to get companions to flee. One would be to remove them as a companion first (SetPlayerTeammate 0) and then ForceFlee, Another would be to create a fake flee package which makes them leave for a different, higher priority reason when their health drops: run to a certain location and wait there, or script them to StartCombat with a NPC in a different cell.


If it's for non vanilla companions, another option would be to not have the NPC be a companion but just a follower. Followers are just regular NPCs using a follow package and will behave as normal.


 



Question
Posts: 134
Joined: Thu Jul 16, 2015 5:33 am

Thanks for the help. Do you

Post by Question » Mon Aug 31, 2015 12:15 pm

Thanks for the help. Do you have a sample script for using a loop with a formlist that i could use as an example?


I guess the best way to replace the NPCs would be to replace them with a leveled list. Is there a hotkey to place it at the exact same spot as an existing NPC in the render window?


Did a lot more experimenting with companions. They seem to completely ignore aggression and assistance values, and confidence values make no difference at all if they are changed mid-combat, they just keep fighting. I can make them forceflee with confidence 0 if i do it BEFORE combat, but in combat, it just does nothing. I tried using a package to make them flee away from the player, but for some reason it just makes them cower in place instead of running away from him. And travel packages to cells that the companion cant reach (like test cells) do nothing.



Post Reply