6648fe150c53c

6648fe150cac5
1 Guest is here.
 

6648fe150d35eRoSoDude

6648fe150d3c1
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 »

6648fe150d535voodoo47

6648fe150d587
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).

6648fe150d64cRoSoDude

6648fe150d695
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.

6648fe150d75avoodoo47

6648fe150d7a3
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

6648fe150d868RoSoDude

6648fe150d8b2
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 »

6648fe150d966voodoo47

6648fe150d9b0
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.

6648fe150da91ZylonBane

6648fe150dada
I thought the emit field allowed an object ID number.

6648fe150db6cvoodoo47

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

6648fe150dd3aRoSoDude

6648fe150dd88
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 »

6648fe150de44voodoo47

6648fe150de94
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.

6648fe150df26ZylonBane

6648fe150df6f
Perhaps trigger on a different event, like PhysMadePhysical.

6648fe150e02fRoSoDude

6648fe150e077
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.

6648fe150e120ZylonBane

6648fe150e168
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.

6648fe150e1e9RoSoDude

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

6648fe150e2f1RoSoDude

6648fe150e339
[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.

6648fe150e3d6voodoo47

6648fe150e41e
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.

6648fe150e4eeZylonBane

6648fe150e538
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));

6648fe150e5ffRoSoDude

6648fe150e648
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 »

6648fe150e6f1ZylonBane

6648fe150e739
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.

6648fe150e803RoSoDude

6648fe150e84b
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 »

6648fe150e8e1voodoo47

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

6648fe150e9e2RoSoDude

6648fe150ea2d
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?

6648fe150eac3voodoo47

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

6648fe150ec6fRoSoDude

6648fe150ecc1
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.
Excuses, excuses, excuses. What a week. Hard times are back.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
6648fe150edb6