6649c1c0c8fe7

6649c1c0c94de
1 Guest is here.
 

6649c1c0c9de2RoSoDude

6649c1c0c9e51
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 »

6649c1c0c9fbcvoodoo47

6649c1c0ca017
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).

6649c1c0ca0edRoSoDude

6649c1c0ca138
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.

6649c1c0ca20evoodoo47

6649c1c0ca259
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

6649c1c0ca324RoSoDude

6649c1c0ca370
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 »

6649c1c0ca426voodoo47

6649c1c0ca46c
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.

6649c1c0ca55aZylonBane

6649c1c0ca5a4
I thought the emit field allowed an object ID number.

6649c1c0ca637voodoo47

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

6649c1c0ca7c5RoSoDude

6649c1c0ca811
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 »

6649c1c0ca8c7voodoo47

6649c1c0ca910
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.

6649c1c0ca999ZylonBane

6649c1c0ca9e2
Perhaps trigger on a different event, like PhysMadePhysical.

6649c1c0caa9bRoSoDude

6649c1c0caae6
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.

6649c1c0cab9cZylonBane

6649c1c0cabe8
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.

6649c1c0cac71RoSoDude

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

6649c1c0cad90RoSoDude

6649c1c0cadd9
[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.

6649c1c0cae7bvoodoo47

6649c1c0caec4
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.

6649c1c0caf71ZylonBane

6649c1c0cafbf
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));

6649c1c0cb090RoSoDude

6649c1c0cb0d9
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 »

6649c1c0cb187ZylonBane

6649c1c0cb1cf
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.

6649c1c0cb2a1RoSoDude

6649c1c0cb2ee
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 »

6649c1c0cb38fvoodoo47

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

6649c1c0cb4bcRoSoDude

6649c1c0cb508
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?

6649c1c0cb59bvoodoo47

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

6649c1c0cb76bRoSoDude

6649c1c0cb7c0
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.
They can be hunted they can be killed.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
6649c1c0cb8c7