664a1b557c857

664a1b557cdba
1 Guest is here.
 

664a1b557d738RoSoDude

664a1b557d7a7
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 »

664a1b557d93avoodoo47

664a1b557d9d2
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).

664a1b557daecRoSoDude

664a1b557db42
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.

664a1b557dc1evoodoo47

664a1b557dc6d
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

664a1b557dd42RoSoDude

664a1b557dd91
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 »

664a1b557de52voodoo47

664a1b557dea4
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.

664a1b557dfa7ZylonBane

664a1b557dff3
I thought the emit field allowed an object ID number.

664a1b557e089voodoo47

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

664a1b557e243RoSoDude

664a1b557e291
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 »

664a1b557e347voodoo47

664a1b557e391
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.

664a1b557e42fZylonBane

664a1b557e47f
Perhaps trigger on a different event, like PhysMadePhysical.

664a1b557e554RoSoDude

664a1b557e5a6
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.

664a1b557e66aZylonBane

664a1b557e6bd
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.

664a1b557e75aRoSoDude

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

664a1b557e888RoSoDude

664a1b557e8d2
[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.

664a1b557e995voodoo47

664a1b557e9e9
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.

664a1b557eab5ZylonBane

664a1b557eb01
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));

664a1b557ebd8RoSoDude

664a1b557ec29
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 »

664a1b557ece1ZylonBane

664a1b557ed2b
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.

664a1b557edfbRoSoDude

664a1b557ee58
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 »

664a1b557ef08voodoo47

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

664a1b557f008RoSoDude

664a1b557f051
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?

664a1b557f0dcvoodoo47

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

664a1b557f2b0RoSoDude

664a1b557f2fc
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.
the Japanese term 'doki doki' expresses the thumping heartbeat of excitement
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
664a1b557f413