6742537e04a1c

Page: [1] 2 »
6742537e05b91
2 Guests are here.
 

Topic: DML Limitations Read 38415 times  

6742537e06414voodoo47

6742537e0647c
think I'll make a quick note about this somewhere - while dmls can do a lot of things in a very convenient way, there are limitations one should be vary of;

- anything that requires mission reprocess will not work (like modifying light properties).
- there are limits on what you can do with an object that has physics, you will not be able to move an object which has physics, and you won't be able to modify any physics related properties (like radius) by regular means.

- you can work around this partially by removing the PhysType from the object, moving it to the desired location, and then assigning a PhysType to it again. do note that when you do this, the PhysType you assign in the end always needs to be OBB (submodels 6), if you try anything else, the object will end up with no physics (no explanation, it just works that way).

- while you won't be able to change any physics related settings, you can reset them by reloading the PhysType on the object (remove it, and readd it, and again, the only one you can readd is OBB with submodels 6), and all the physics properties will be re-inherited from the archetype. you can set the desired properties on the archetype via gamesys.dml (do note that this will affect things globally, so make sure you won't do something that will break things).

-when adding scripts, always add a null script if you are adding less then four;
Code: [Select]
+ObjProp xxx "Scripts"
{
"Script 0" NVRelayTrap
"Script 1" ""
"Script 2" ""
"Script 3" ""
"Don't Inherit" false
}

if you don't fill in the "" value, any script that is on the respective position on the archetype will get re-inherited, causing all sorts of evil stuff to happen (more instances of the same script is a bad thing).


when making dmls, it's always prudent to check whether they actually work - either add dbmod_log 10 to your cam_ext.cfg and examine dbmod.log after you run the game and load the level with its dml, or open the level in editor and load the dml into it via the dbmod_load command. if you've screwed something up, the log (or the console) will spew out errors.

however, to check whether they really, positively get applied, you will need to run the game, make a save, start up the editor, type set game_mode_backup 0 into the command windows (and press enter), then go to the game mode, load that save, go back to the editor mode, and check the object in question manually (for example, when trying to modify climbable sides of a ladder, all logs looked fine, but when trying things ingame, it looked liked the dml was not getting applied, and doing the extra check has confirmed that it was not, as it's a physics property).


will add more stuff if I find something interesting.
« Last Edit: 30. January 2017, 14:45:04 by voodoo47 »

6742537e06583Yankee Clipper

6742537e065d0
The limitation that I have found to be the most, well, limiting, is the inability to create anything new. Not only can't you create a new class of something, like say the OneRifledSlug, but you are also unable to create a new instance of anything. If I want to add a laser pistol to an existing crate, the only way I can do it is to steal an already existing laser pistol from somewhere else in the level, if one exists. But I can't just create a new one that didn't already exist in the level.

6742537e066a5voodoo47

6742537e066ef
you can create new objects via dmls (setting up an existing junk object as non-rendered physicsless tweq trap and triggering it in some smart way), but I don't think you will be able to link the spawned object to anything, as you have no way of knowing the spawned object's id.

but yeah, the OneRifledSlug would be an impossibility. //edit ND 2.48 - this no longer is the case, dml archetypes can be created now.
« Last Edit: 08. March 2020, 18:29:37 by voodoo47 »

6742537e06867Yankee Clipper

6742537e068b2
Is there a way to change the Act/React Sources link on a projectile? For example, for an EMP Shot (-235), the Act/React Sources is EMP (-390). I know I can directly edit the gamesys with ShockEd to change it to a different stim, but what if I want to do it via dml? I can't find anything in proplist.txt that would allow me to get at that value. Am I missing something?

I am playing around with converting the EMP Rifle to a rifle that shoots balls of electricity - like the maintenance bots. I would just change the link in the projectile section, but then the problem is that there is only 1 kind of electricity projectile: -1500. That means I don't have anything for the overload setting. Since the bot just uses one setting, they didn't create a 2nd "Big" electricity shot. Again, I could create another one by editing the gamesys, but I would like to stick to dml if there is a way to accomplish my goal.

Right now I have a rifle that shoots EMP in normal mode and then shoots a ball of electricity in the overload mode. It is all dml, but with the 2 different kinds of stims, it seems inelegant.

6742537e06951voodoo47

6742537e0699a
nope, act/react cannot be dml modified as far as I know - just as you said, no mention of this in the proplist.

//the latest NewDark supports this.
« Last Edit: 30. January 2017, 14:47:26 by voodoo47 »

6742537e06c0dThiefsieFool

6742537e06c5f
I would link the electricity projectile to both settings, then edit the Gun - Base Gun Description property to increase the Stim Mult of the secondary fire, that should work to give it more damage since Stim Mult is used by gun modifications to boost the gun's damage.
You can't boost the effect radius this way sadly but you can do weird stuff like boosting the speed of the projectile with Speed Mult.

6742537e06d88Yankee Clipper

6742537e06dde
I tried that at first, but I was doing it wrong. The lowly pistol setup gave me the right answer: setup the "Setting" number as -1 instead of either 0 or 1.

Any ideas on how to get the little picture and text in the ammo display right? An unmodded emp rifle shows a little lightning bolt in the ammo display plus the text "EMP". Once modded, the display has no picture or text. For now, I would like to keep the lightning bolt, but have the text say "ELEC".

6742537e06eafThiefsieFool

6742537e06ef9
I think the projectile or the ammunition has Obj - Object Icon and Obj - Object Name properties for that.

6742537e06f88OmegaDEATH

6742537e06fd0
Ok if I'm reading this right, the dml system can change in game variables or scripting?

6742537e07073voodoo47

6742537e070bb
dmls can do what the Shocked editor does, but only with objects and with some additional limitations.

you don't really need to read this unless you plan to create mods or tweak existing ones.

6742537e07166OmegaDEATH

6742537e071ad
I'm sorry if i'm anoying as hell.

I really need to make a sort of headtracking work for my project.
Just learning ss2 modding while I am at it.

But yeah opened some .dml's and saw what u mean "in game object config files"

6742537e07260voodoo47

6742537e072aa
my recommendation would be - get to know Shocked a bit before jumping on the dml bandwagon. will make things much easier to understand. when I make dmls, I always try the fix out in the editor, and when everything works, export it into the dml, then test whether it really works when applied by dml (see the first post).
Acknowledged by: OmegaDeath

6742537e076bbYankee Clipper

6742537e0770d

- there are limits on what you can do with an object that has physics, you will not be able to move an object which has physics, and you won't be able to modify any physics related properties (like radius) by regular means.


I just found the hard way that this isn't exactly true...

You can move objects that have physics - they just won't stay moved. One minute they are where you put them and the next they are back where they came from. Was just going to ask for a clue when the answer was here all along.

6742537e077d6voodoo47

6742537e0781f
I actually know about that - they will snap back to their orig position as soon as they collide with another physics object. the workaround (as mentioned) is to strip the phystype away, move the object, then readd phystype again (but only OBB/6). probably not too recommended, so it shouldn't be done unless absolutely necessary.

6742537e078a7Yankee Clipper

6742537e078ef
I wanted to do it, therefore it was absolutely necessary.

6742537e079d3ZylonBane

6742537e07a6a
Well there's no good way to take that!

6742537e07cbcRocketMan

6742537e07d0e
I wanted to see what happens when you mix ammonia and bleach.  Therefore...

6742537e08161Yankee Clipper

6742537e081b7
- there are limits on what you can do with an object that has physics, you will not be able to move an object which has physics, and you won't be able to modify any physics related properties (like radius) by regular means.

- you can work around this partially by removing the PhysType from the object, moving it to the desired location, and then assigning a PhysType to it again. do note that when you do this, the PhysType you assign in the end always needs to be OBB (submodels 6), if you try anything else, the object will end up with no physics (no explanation, it just works that way).

Unless I'm misunderstanding you, this is not completely accurate. I have moved the SFG in the armory on medsci2 with no complications.
Code: [Select]
-ObjProp 587 "PhysType"
+ObjProp 587 "Position"
{
"Location" -91.1102, 21.9362, 3.97595
"Heading" 4000
}
+ObjProp 587 "PhysType"
{
"Type" Sphere
"# Submodels" 1
"Remove on Sleep" FALSE
"Special" FALSE
}

The SFG ends up behind the force field protected closet a few rooms away, on the shelf next to the armor. I can pick it up and use it without complications.

6742537e0829bvoodoo47

6742537e082ee
it's still not working, but in this case, the limitation will not cause any serious problems. basically, the SFG will just end up with no physics (even though you assigned sphere), meaning it won't be affected by physical force (explosions and similar). you will still be able to pick it up, and once you do that, all potential problems will be gone, as once you drop it, the physprops will get reinherited from the archetype.

try moving a turret if you want to break things.

6742537e083f2Yankee Clipper

6742537e0843b
I don't want to break things. I think the Heavy weapons category is setup all backwards. The SFG should be the entry level weapon. You freeze the bad guy and then go beat on him with the wrench. The grenade launcher is the uber weapon in that class and should be setup as the level 6. Leaving the fusion cannon at something like 3, I guess. Anyway, I was playing around with tweaking the SFG and I wanted to move it out of the armory to make it available from very early on.

Would the SFG or any other weapon be affected in some way by physical force? I'm trying to think of a situation where that would be true, but I can't think of anything that applies. Even if a weapon is sitting next to an explosion, they don't even get moved an inch, do they?

6742537e084f0voodoo47

6742537e08540
they do, but not very much, afaik. that's why I'm saying, not having physics on a weapon in the world is ok for all practical purposes - you have to be really, really observant to notice the difference.

so if you want to dml move a weapon, feel free to - should carry very little risk, if any.

6742537e0877cYankee Clipper

6742537e087c6
What is used as the escape character in DML scripting? I have a string I am trying to modify, but the string contains some quotation marks. The entry from objlooks.str:

gren_launcher:"The TC-11 Grenade Launcher requires a Heavy Weapons skill of 1 in order to use.  The first modification to this weapon increases the clip size, while the second increases the speed of the grenades and reduces the reload time.  Neither modification significantly affects grenade damage.  The TC-11 \"Brick\" can launch a wide variety of ordnance, from standard high-explosive, to proximity detection rounds, EMP, or White Phosphorus incendiary.  Creative souls have been know to jury rig other types of ammo.  Unlike the earlier generations of launchers, The TC-11 utilizes a reverse polarization magnetic launching mechanism instead of compressed gas."

should be changed with this command:

+ObjProp -21 "ObjLookS" = GrenLauncher: "The TC-11 Grenade Launcher requires a Strength of 4 and a Heavy Weapons skill of 6 in order to use.  The first modification to this weapon increases the clip size, while the second increases the speed of the grenades and reduces the reload time.  Neither modification significantly affects grenade damage.  The TC-11 \"Brick\" can launch a wide variety of ordnance, from standard high-explosive, to proximity detection rounds, EMP, or White Phosphorus incendiary.  Creative souls have been know to jury rig other types of ammo.  Unlike the earlier generations of launchers, The TC-11 utilizes a reverse polarization magnetic launching mechanism instead of compressed gas."

But, in the game, the string is truncated to:

The TC-11 Grenade Launcher requires a Strength of 4 and a Heavy Weapons skill of 6 in order to use.  The first modification to this weapon increases the clip size, while the second increases the speed of the grenades and reduces the reload time.  Neither modification significantly affects grenade damage.  The TC-11 \

The backslash [\] works as an escape character in the file but not in the dml script.

6742537e08861voodoo47

6742537e088aa
\" is probably what is causing the problems. I think you will have to avoid those.

6742537e089ceYankee Clipper

6742537e08a26
No, the quotation mark is the problem. In the file, the backslash let the engine know that the coming quotation mark is not the end of the string. The backslash notifies the engine to just quote the quotation mark instead of treating it like the end of the string. But, the backslash is not having that effect with the dml. Instead, the engine considers the backslash as part of the quote and then ends the quote when it hits the next quotation mark in the middle of the string. There must be some other character that is used as the escape character in the dml script. At least I hope there is, otherwise it would be impossible to have a quotation mark inside a string.

2 Guests are here.
Nobody exists on purpose. Nobody belongs anywhere. Everybody's going to die. Come watch TV?
Page: [1] 2 »
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
6742537e094cd