665aca010c3a4

665aca010cda2
1 Guest is here.
 

665aca010d7b6RoSoDude

665aca010d81c
Hi there. I'm actually having the same issue as a previous poster (I'm doing it in DML and he was doing it via ShockEd, but the issue is exactly the same), which is that the Intensity of the StimSource associated with Rifled Slug (-516), Double Slug (-3422), Pellet Projectile (-524), and Double Pellet (-3423) does not affect the damage dealt by the shotgun in any way. I can make it 100 or 0 and the damage will be the same regardless. I've tried testing on existing saves as well as an entirely new game file.

The offending DML snippet:
Code: [Select]
+StimSource -3422 "Standard Impact" 00900040 //Double Slug
{
Intensity 100 //was 14
}
+StimSource -3423 "High Explosive" 00900041 //Double Pellet
{
Intensity 100 //was 2
}
When I use dbmod_load gamesys.dml in ShockEd, the new intensities are reflected in the object hierarchy. But there is no difference in the game.

I confirmed that the issue is not something with my load order or syntax by trying the same with the Pistol's Standard Bullet (-362) StimSource as follows, which changes both the object hierarchy and the effectiveness in the game:
Code: [Select]
+StimSource -362 "Standard Impact" 00900003 //Standard Bullet
{
Intensity 100 //was 4
}

I've also tried deleting and adding an identical stim, which produces the same behavior. Am I missing something, or is there something hard-coded that's overriding the shotgun damage?

EDIT: copied the wrong DML segment from my stim replacement attempt -- what's posted above should be correct but still doesn't work
« Last Edit: 16. April 2020, 21:40:02 by RoSoDude »

665aca010d992voodoo47

665aca010da00
let me guess, your dml is not in a proper modfolder? that would mean it will get overridden by the tool's gamesys.dml, which indeed tweaks those exact values. use your dml as a regular mod (which you really should be doing anyway), and it will be fine (would strongly recommend always using the link id to make sure the correct link is edited).

665aca010dae7RoSoDude

665aca010db3a
Yep, that was it! I originally started working from the root folder but I already have some other files in a proper mod folder, I'll make sure everything is moved there. Thanks!

Also, the lack of a link ID was just due to me copying the snippet here wrong -- I've always been including those in my actual DML.

665aca010dc22voodoo47

665aca010dc80
sure.

generally, the gamesys.dml from the patch_ext folder is something one should be aware of when building gamesys mods - sometimes, things might conflict even with proper mod priorities. bit of a bother, but I don't have any way of preventing it from happening (yet).

anyway, checking the dml or asking here should get things cleared up in a matter of moments.
Acknowledged by: RoSoDude

665aca010dd6bRoSoDude

665aca010ddbe
Unrelated question: Can I use CfgTweqEmit to spawn a Stasis Field Generator? When I try to use it in my mission DML, it cuts off after 15 characters (the maximum length of field "Emit what"). Specifying the archetype ID instead of the name spawned a bogus item, so that doesn't work either.

EDIT: Nevermind, I just used the wrong archetype ID. It totally works. Ignore.
« Last Edit: 17. April 2020, 17:21:43 by RoSoDude »

665aca010de83voodoo47

665aca010ded6
also note that the place where you are spawning the item needs to be roomy enough to actually hold the item, if not, it won't get spawned.

and yes, there is a 15 char limit for that field.

665aca010dfdcZylonBane

665aca010e027
I thought the emit field allowed an object ID number.

665aca010e0cfvoodoo47

665aca010e12d
it does, but he managed to put an incorrect id in, so something else was spawning instead of the SFG.

665aca010e27dRoSoDude

665aca010e2ca
Just tagging onto this thread with an odd issue.

SS2 is crashing when I try to attach a certain custom script to a projectile archetype. The script creates an object and adds it to the player's inventory. The crashing only happens when starting a new game, not when loading an existing save or starting from the editor. I've narrowed it down to the minimal working example below.

In gamesys.dml:
Code: [Select]
+ObjProp -1352 "Scripts" //Stasis Shot
{
    "Script 0" "rsdTest"
    "Script 1" ""
    "Script 2" ""
    "Script 3" ""
    "Don't Inherit" FALSE
}

In sq_scripts\*.nut:
Code: [Select]
class rsdTest extends SqRootScript {
function OnCreate() {
local obj = Object.Create("Small Prism");
ShockGame.AddInvObj(obj);
}
}

The same script has no problem when attached to an archetype that isn't a Projectile, e.g. Pistol (-17). Tested with SCP beta 4 gamesys.
« Last Edit: 21. April 2020, 05:18:18 by RoSoDude »

665aca010e3a5voodoo47

665aca010e3f7
the error message/crashdump might shed some light into this, but attaching stuff to projectiles in that way does sound like a bad idea™ if you ask me.

try adding a small delay to the squirrel code.

665aca010e530ZylonBane

665aca010e58a
Perhaps trigger on a different event, like PhysMadePhysical.

665aca010e684RoSoDude

665aca010e6d0
Different event didn't work, but adding a 0.05s timer delay did. Thanks for the suggestions.

The feature I'm implementing requires the script to be associated to a projectile, as far as I can tell. Other than this new game crash it was all working more or less perfectly.

665aca010e794ZylonBane

665aca010e7df
As a slight optimization, having the script send a PostMessage to itself instead of using a timer might also work, since that defers execution until after all current messages are processed. See the SCP "scpBBall" script for an example.

665aca010e86eRoSoDude

« Last Edit: 21. April 2020, 17:05:15 by RoSoDude »

665aca010e992RoSoDude

665aca010e9dd
[bumped from edit to new post] Semi-related question, does anyone know why the Fusion Canon creates 1 Fusion Shot (-232) projectile on the NORM setting, but 4 Big Fusion Shot (-3424) projectiles on the DEATH setting (or at least, OnCreate runs 4 times)? There's nothing in the BaseGunDesc or links that would indicate why.

665aca010ea9evoodoo47

665aca010eaea
very, very sure it's just one (vanilla and SCP - two projectile links on the -26 archetype). I'm also seeing just one create message on -3424 when firing.

665aca010ebbcZylonBane

665aca010ec06
I only see one creation event when firing a Big Fusion Shot. Perhaps your script is somehow getting inherited by something else. Try adding this to your event handler:

print(ShockGame.GetArchetypeName(self));

665aca010ecdbRoSoDude

665aca010ed25
Yeah, NVSpy tells me that only one creation event is sent too, but OnCreate() is getting called 4 times for some reason. When I print the archetype name it's always Big Fusion Shot. Very strange.

EDIT: managed to fix it by adding two IsDataSet() hacks (one in OnCreate(), and one in the PostMessage event handler function), each of which eliminated one of the double-firings of the script.
« Last Edit: 21. April 2020, 17:49:00 by RoSoDude »

665aca010edd3ZylonBane

665aca010ee1d
Still, the fact that you're getting multiple events, but we're not, strongly indicates that you've Messed Something Up. You can deal with the symptoms now, but the root cause may well bite you in the ass later.

665aca010eefcRoSoDude

665aca010ef4a
Well that's the thing though -- I don't get multiple events from NVSpy, which only signals the existence of one Big Fusion Shot. The script itself just runs 4 times for some inexplicable reason, which isn't happening with any other projectile.

EDIT: Not inexplicable, the Big Fusion Shot inherits from Fusion Shot to which I've attached the same script. Doy. Thanks for pointing that out.
« Last Edit: 21. April 2020, 22:31:59 by RoSoDude »

665aca010efe8voodoo47

665aca010f030
yeah, multiple instances of the same script on one object is a big no-no.

665aca010f104RoSoDude

665aca010f14f
Another day, another random question -- squirrel.osm doesn't get automatically loaded when I open SCP rick2.mis, rick3.mis, or shodan.mis in ShockEd. I'm on the latest NewDark. Is this a problem? Squirrel still loads in the game proper, right?

665aca010f225voodoo47

665aca010f29d
if you have a tool patched install, yes, it will be loaded for the game exe.

665aca010f550RoSoDude

665aca010f5b2
Moving the discussion here from my mod archive thread for a bit.

I'm trying to move the prisms I created via NVCreateAndLink "Contains" in medsci1.mis.dml to the blue room. It seems to work, but when I loot the item from the container it's supposed to be linked to, the item does not appear in my inventory. There are no problems when I have the item spawn physically inside the crate, though that's not a very tenable solution for some corpse loot on other maps. I assume this is because the item isn't initialized because it's in a different zone.

The working version (spawned physically inside the crate):
Code: [Select]
////Puts a Small Prism in the crate by the autopsy lab
+ObjProp 562 "Scripts" //A Crate#1
{
    "Script 0" "NVCreateAndLink"
    "Script 1" ""
"Script 2" ""
    "Script 3" ""
    "Don't Inherit" false
}
+ObjProp 562 "ObjList" = "NVCreateAndLinkOn="Sim"; NVCreateAndLinkCreate="-41"; NVCreateAndLinkLinkType="Contains"; NVCreateAndLinkLoc="0.0, 0.0, 0.0"; NVCreateAndLinkCount=1;" //A Crate#1

The non-functional version (spawned inside blue room)
Code: [Select]
////Puts a Small Prism in the crate by the autopsy lab
+ObjProp 562 "Scripts" //A Crate#1
{
    "Script 0" "NVCreateAndLink"
    "Script 1" ""
"Script 2" ""
    "Script 3" ""
    "Don't Inherit" false
}
+ObjProp 562 "ObjList" = "NVCreateAndLinkOn="Sim"; NVCreateAndLinkCreate="-41"; NVCreateAndLinkLinkType="Contains"; NVCreateAndLinkLoc="43.3715, 154.857, 1.99"; NVCreateAndLinkLocObj=0; NVCreateAndLinkCount=1;" //A Crate#1
1 Guest is here.
I just found a four legged spider. THEY'RE DEVOLVING.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
665aca011062b