6743a39ab3969

Page: [1] 2 ... 4 »
6743a39ab4d14
1 Guest is here.
 

Topic: Move stuff around Read 9878 times  

6743a39ab5491
One of the things that makes SS2 less playable is that after the 10th playthrough, is that you know where all the necessary stuff is.

I have been thinking about opening up shocked and move stuff around several times, but then the game would not be compatible with mods like SCP anymore, and i would rather play with SCP than with stuff moved to different locations, that i know where I've moved to anyways.

Recently i have then thought about if it would be possible to move stuff around without having to change stuff inside the MIS files. Like via a script or something, so that mods that changes the MIS files would still be compatible. I've also thought if it would be possible to move stuff to "random" possible locations from within a given radius, and if that would be a good idea at all.

Some of you guys in here does amazing stuff with the game, and can probably answer me if this is possible, and if i intend to make such a "mod", where should i start?

EDIT: Maybe i should clarify that by stuff, i mean items like hypos, cyber modules, access cards, quest items etc.
« Last Edit: 08. March 2017, 10:27:26 by Da9L »

6743a39ab55a6icemann

6743a39ab5622
If you somehow made a mod that allowed for placement of items into a container then the world would love you.
6743a39ab5727
Could i use a DML to change an objects position ?
6743a39ab5e06
According to voodoo in the randomiser thread it should work with SCP.
6743a39ab6009
According to voodoo in the randomiser thread it should work with SCP.
It's a mis mod, meaning the game won't crash, but map fixes from SCP obviously will not carry over.
6743a39ab6229
It's a mis mod, meaning the game won't crash, but map fixes from SCP obviously will not carry over.

Exactly, and that is why im searching for something else. I have never touched DML but looking at it it seems that you can input positions of objects. I guess i could do that to all existing objects no ?

6743a39ab639evoodoo47

6743a39ab63e8
and each new version of SCP is probably less and less compatible, so yeah, mixing those two is not recommended.

anyway, to answer the original question, a SCP compatible dml randomizer mod is definitely possible, but would be a lot of work even for someone who knows his way around dmls and NVscript (which is fully capable of semi-randomly spawning stuff around, and even allows putting things back into containers).

but one has to start somewhere, so by all means, go for it - reading ZB's NVRelayTrap for dummies would be a good start (should show you how the randomization works).
« Last Edit: 10. March 2017, 08:24:51 by voodoo47 »
6743a39ab6528
Sounds like a plan. I've used Nvscripts before in ShockEd, but its a long time ago so i guess I'll have to read up on it again.

And to make things easier i was thinking about writing a windows application that could generate the dml files for me, but I'll look into it. Is there any dummy guide for DML's ?
6743a39ab6687
There is an extensively commented sample in SS2\Docs\newdark\dbmod-sample.dml
And there are notes by voodoo about adding NVScript and fingerprints to DMLs.
No dummie guide afaik.

6743a39ab67bevoodoo47

6743a39ab680c
those are a bit too random to be of too much help though. anyway, dmls are pretty much just a way of assigning props and values to archetypes and concretes, just like when you modify stuff in the editor. checking any of currently existing dml mods for reference should be helpful.

to tackle this particular mod, I would probably take the original item (lets say a keycard), nvcreateandlink spawn three more instances at different places upon level start, then randomly destroy all but one after a few seconds - this should be doable without too many shenanigans. and repeat the process/setup for all items that need to have randomized locations, checking whether things work each time (gulp).

randomizing crate contents should be doable by changing them into virtual corpses that have loot.

6743a39ab693eNameless Voice

6743a39ab698d
You could also CreateAndLink teleport traps hooked up to the item to move, and then trigger one of those at random.

That way, you are moving the actual object and not creating/deleting clones.

If you just spawn more from the archetypes, you'll lose any specific settings on the items.

6743a39ab6a1dvoodoo47

6743a39ab6a66
that most likely is the best way of doing this.
6743a39ab6cce
You could also CreateAndLink teleport traps hooked up to the item to move, and then trigger one of those at random.

That way, you are moving the actual object and not creating/deleting clones.

If you just spawn more from the archetypes, you'll lose any specific settings on the items.

Can i do this without editing the mis file?

6743a39ab6fd8voodoo47

6743a39ab7029
yes you can. off the bat, you will need to assign (3x) nvcreateandlink and a nvrelaytrap to the concrete, and set the objlist arguments up in a way that would spawn the three teleporters on locations of your choice upon level start, and randomly activate just one (with the relaytrap) few milliseconds later.

pretty sure I could create a template for you, but I'm off my main rig for a week and doing anything more than posting on this awful netbook is a major pita. maybe I'll try tomorrow.


hmm, lets see;
Quote by medsci1.mis.dml:
DML1

//set up the scripts on the card
+ObjProp 1050 "Scripts"
{
   "Script 0" NVRelayTrap
   "Script 1" NVCreateAndLink
   "Script 2" NVCreateAndLink2
   "Script 3" NVCreateAndLink3
}
//and create three teleport traps at appropriate locations, linked to the card and ready to fire, with the relay trap triggering one randomly upon level start
+ObjProp 1050 "ObjList"
{
   "" NVCreateAndLinkOn="BeginScript"; NVCreateAndLinkCount=1; NVCreateAndLinkCreate="Teleport Trap"; NVCreateAndLinkLinkType="~SwitchLink"; NVCreateAndLinkLoc="58,-6,0"; NVCreateAndLinkLocObj=0; NVCreateAndLink2On="BeginScript"; NVCreateAndLink2Count=1; NVCreateAndLink2Create="Teleport Trap"; NVCreateAndLink2LinkType="~SwitchLink"; NVCreateAndLink2Loc="58,-6,-3"; NVCreateAndLink2LocObj=0; NVCreateAndLink3On="BeginScript"; NVCreateAndLink3Count=1; NVCreateAndLink3Create="Teleport Trap"; NVCreateAndLink3LinkType="~SwitchLink"; NVCreateAndLink3Loc="70,-6,-3"; NVCreateAndLink3LocObj=0; NVRelayTrapOn="BeginScript"; NVRelayTrapOnDelay=50; NVRelayTrapTCount=1; NVRelayTrapTOn="TurnOn"; NVRelayTrapTDest="&?~SwitchLink";
}

this will randomize the location of the first medsci card - it will be either on the table, or under it, or in the middle of the room.
« Last Edit: 11. March 2017, 18:55:08 by voodoo47 »
Acknowledged by: Da9L
6743a39ab7144
It seems like it will be quite the task to make this on more objects. If i were to do this on serveral objects it would probably take a while. I will look into if i can make stuff easier by automating the script generation somehow.

6743a39ab71e5Nameless Voice

6743a39ab7234
The only thing that changes is the locations.  You can just copy-paste the rest.

6743a39ab72fcvoodoo47

6743a39ab7345
yes, this template will work for any object that is placed in the world directly and has no scripts assigned, all you have to do is copy paste it around and change obj ids and locations appropriately (you will have to get those from the maps via Shocked).

different types of objects (card on a corpse) will require something different, depends on what would you want to do.

6743a39ab778avoodoo47

6743a39ab77e0
this will randomize the location of the first medsci2 card, placing it on different corpses (the original, the drunk bed guy near the ghost, and the toasty man in the first rad room). slightly sloppy, as it's using junk object 101 as a router/trigger, but whatever works, right?
Quote by medsci2.mis.dml:
DML1

//kill the original contains link
-Link 105 1904 "Contains"
//add links to send the random signal from the trigger object to all corpses
+Link 101 105 "ScriptParams"
{
}
+Link 101 497 "ScriptParams"
{
}
+Link 101 609 "ScriptParams"
{
}
//set the trigger object up to send the AssignCard signal upon level start
+ObjProp 101 "Scripts"
{
   "Script 0" NVRelayTrap
   "Script 1" ""
   "Script 2" ""
   "Script 3" ""
}
+ObjProp 101 "ObjList"
{
   "" NVRelayTrapOn="BeginScript"; NVRelayTrapOnDelay=50; NVRelayTrapTCount=1; NVRelayTrapTOn="AssignCard"; NVRelayTrapTDest="&?ScriptParams";
}
//each corpse needs to be ready to link with the card upon the AssignCard signal
+ObjProp 105 "Scripts"
{
   "Script 0" NVLinkBuilder
   "Script 1" ""
   "Script 2" ""
   "Script 3" ""
}
+ObjProp 105 "ObjList"
{
   "" NVLinkBuilderOn="AssignCard"; NVLinkBuilderCount=1; NVLinkBuilderLinkType="Contains"; NVLinkBuilderLinkSource="105"; NVLinkBuilderLinkDest="1904";
}
+ObjProp 497 "Scripts"
{
   "Script 0" NVLinkBuilder
   "Script 1" ""
   "Script 2" ""
   "Script 3" ""
}
+ObjProp 497 "ObjList"
{
   "" NVLinkBuilderOn="AssignCard"; NVLinkBuilderCount=1; NVLinkBuilderLinkType="Contains"; NVLinkBuilderLinkSource="497"; NVLinkBuilderLinkDest="1904";
}
+ObjProp 609 "Scripts"
{
   "Script 0" NVLinkBuilder
   "Script 1" ""
   "Script 2" ""
   "Script 3" ""
}
+ObjProp 609 "ObjList"
{
   "" NVLinkBuilderOn="AssignCard"; NVLinkBuilderCount=1; NVLinkBuilderLinkType="Contains"; NVLinkBuilderLinkSource="609"; NVLinkBuilderLinkDest="1904";
}

do note that card 1904 already has a script assigned (FrobQB), you definitely don't want to overwrite that no matter what kind of setup you end up using. in such cases, you will have to find a way of setting things up without breaking anything (the setup from this post does that, at the cost of that junk item being used instead).

and now comes the fun part - want the mod to be universal? need to check everything with vanilla, SCP, Secmod..
« Last Edit: 12. March 2017, 20:16:09 by voodoo47 »
Acknowledged by: Da9L
6743a39ab791c
Thanks Voodoo47.. Im new to DML, but i tried out your file, by placing it in a folder in my DMM folder, and surely enough it popped up in Blue mod manager as a DML mod, which i then activated and ran the game, but the card is still on the same corpse as the original. Do i need to do something else to get DML to work? I have no other mods activated, and my Shock version is 2.43

6743a39ab7a27voodoo47

6743a39ab7a75
update to 2.45 (SS2tool), then create a new folder in the DMM folder, lets say Randomizer, then you need to create medsci1.mis.dml and medsci2.mis.dml files there, and copy paste the contents from here. make sure your windows is set to display file extensions properly so you wouldn't end up with txt instead of dml.

you need to start a new game (or load a save right before entering the map you want to test for the first time), map dmls will not work with old saves.
6743a39ab7b9c
Updating seemed to do the trick, thanks again Voodoo47.. Just tried out something i made my self, and it works :-)

Code: [Select]
DML1

FINGERPRINT
{
   1892 [105.14 -5.11 -2]
   870 [104.99 -0.17 -2]
   1131 [97.79 0.96 -2]
   1939 [94.26 4.32 -2]
   361 [90.57 9.52 -2]
   392 [101.62 18.81 -2]
   1087 [122.71 69.42 -2]
   388 [127.93 65.88 -2]
   476 [128.1 61.64 -2]
   365 [127.73 57.51 -2]
}

ObjProp 1050 "Position"
{
"Location" 63.4508, -21.2027, 1.58087
"Heading" f100
}

Do i need the fingerprint section?
1 Guest is here.
the Japanese term 'doki doki' expresses the thumping heartbeat of excitement
Page: [1] 2 ... 4 »
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
6743a39ab890e