665c324e90a3a

665c324e91556
1 Guest is here.
 

665c324e91e66RoSoDude

665c324e91f34
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 »

665c324e920d1voodoo47

665c324e9212f
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).

665c324e92204RoSoDude

665c324e92253
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.

665c324e9237bvoodoo47

665c324e923c9
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

665c324e92499RoSoDude

665c324e924e6
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 »

665c324e92595voodoo47

665c324e925e2
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.

665c324e926d7ZylonBane

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

665c324e927c1voodoo47

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

665c324e929c9RoSoDude

665c324e92a1b
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 »

665c324e92ad9voodoo47

665c324e92b28
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.

665c324e92bbbZylonBane

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

665c324e92ccbRoSoDude

665c324e92d18
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.

665c324e92ddfZylonBane

665c324e92e2d
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.

665c324e92ebcRoSoDude

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

665c324e92fd1RoSoDude

665c324e9301d
[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.

665c324e930d7voodoo47

665c324e93137
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.

665c324e931e9ZylonBane

665c324e93237
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));

665c324e9330fRoSoDude

665c324e93364
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 »

665c324e9342aZylonBane

665c324e93478
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.

665c324e93555RoSoDude

665c324e935a2
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 »

665c324e93639voodoo47

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

665c324e93740RoSoDude

665c324e9378d
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?

665c324e93807voodoo47

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

665c324e939d8RoSoDude

665c324e93a26
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.
It starts where it ends. It always does.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
665c324e993bc