66387ab760ecd

66387ab761508
1 Guest is here.
 

Topic: How do I edit properties with DMLs? Read 26857 times  

66387ab761ac4marcelo

66387ab761b33
Hey Voodoo, thank you for explaining the basics on dml editing. I finally figured it out and would like to learn more about it. Is there a list of common edits somewhere I could check out? I'm specifically looking for weapon damage (specially wrench), AI damage and explosion radius. I've been looking all over the Forum for more info on dml but I just found a few things here and there.
« Last Edit: 27. January 2018, 11:15:57 by Moderator »

66387ab761e5fvoodoo47

66387ab761ed6
you will need the list of all props (type dump_props_full in the command window of the editor and hit enter, a proplist.txt file will be created in the SS2 folder), know what to edit (this is kind of the hard part because you need to know/find out how things work in the gamesys), and then put the dml together properly (there is documentation in the doc folder that you should read).

quick example of how to edit rumbler damage (or rather, the damage of its claw) hit F3 in the editor, type rumbler claw and press enter, click export/as single dml and save, now you have an example of a working dml code. yank out the code snippets you need, modify them, put them into your dml. test the dml by loading it into the editor (dbmod_load in the command window), errors will be spewed out by the console if something went wrong with the syntax.
Code: [Select]
DML1

// Object Export of "Rumbler Claw (-1614)"

// Note: Reverse links are not exported. Links, receptrons, stims and metaproperties are exported with '++',
//       which will cause duplicates if the DML is used on an already populated object.


// Schema->Class Tags
+ObjProp "Rumbler Claw" "Class Tags"
{
"1: Tags" "EnemyWeapType RumblerClaw"
}

++StimSource "Rumbler Claw" "WeaponStim"
{
Intensity 1

Propagator "Contact"
{
Shape
{
"Contact Types" "Weapon Swing Low, Weapon Swing Med, Weapon Swing High"
"Velocity Coeff" 0.00
"Frob Time Coeff" 0.00
}
}
}

++StimSource "Rumbler Claw" "WeaponBash"
{
Intensity 20

Propagator "Contact"
{
Shape
{
"Contact Types" "Weapon Swing Low, Weapon Swing Med, Weapon Swing High"
"Velocity Coeff" 0.00
"Frob Time Coeff" 0.00
}
}
}
you only need the StimSource Intensity part, and you are editing what already exists, so no ++ (see the docs to see why), so
Code: [Select]
DML1

StimSource "Rumbler Claw" "WeaponBash"
{
Intensity 2
}
save as gamesys.dml (will be applied to all gamesyses) drop into SS2 root or any modfolder, run the game, hit SHIFT+; to open the console and type summon_obj rumbler, give him a hug and see whether it's weak as a fly. note - additional trickery will be required to apply this to all the rumblers that already exist in levels.
« Last Edit: 17. January 2018, 09:05:57 by voodoo47 »

66387ab761fcfmarcelo

66387ab76201d
Thanks for the quick reply Voodoo. Few questions. How do I open the command window of the editor? are all codes for damage in all AI described as stimsource? what about weapon damage specifics?

66387ab7620eavoodoo47

66387ab762135
the command window is always there, lower right corner. yeah, pretty sure that the AI damage will be stimsource, but would need to snoop around, and that's something you can do as well. basically, you are looking either for the creature's melee weapon, or it's projectile, both will be linked to the creature in some way.

66387ab76222amarcelo

66387ab762277
Again thanks for the quick reply. So far so good. Could you please expand a bit on the ++ thing? For example, I edited the Standard Bullets Damage points but I saw no changes with the edits, only when I left the ++ the edits were successful. I'm editing on top of SPC, perhaps it has to do with it?

I'm also experience difficulty with camera hit points. The dml edits don't seem to stick with em. Also, Are these things possible with dml edits?:

1. Camera rotation speed.

2. Camera reacting to hits: example (Camera turning yellow after x number of hits?)

66387ab76239fvoodoo47

66387ab7623ed
if it's "not sticking", something is wrong, probably. post the code, explain what you have tried to do.

++ is add no matter what, + is add if it doesn't exist and edit if it does, nothing is just edit if it already exists if memory serves (see Modify an existing object property in dbmod-sample.dml, and the rest of the file as well, probably).

1. export the security camera archetype as dml, look for scan speed.
2. probably doable via act-react, or NVscript, but that's like lesson 3, you are still at 1.

at this point, you should be trying to edit whatever you want to edit in the editor, then try the edit out (game/game mode in Shocked, press alt+e to return), and if it does, export the change into your dml. once you have that, you can move forward to the more complex stuff.
« Last Edit: 27. January 2018, 11:21:07 by voodoo47 »

66387ab7625aemarcelo

66387ab76260a
This is what I initially edited for Standard Bullets:

Code: [Select]
//StimSource "Standard Bullet" "Standard Impact"
{
Intensity 8

Propagator "Contact"
{
Shape
{
"Contact Types" "Collision"
"Velocity Coeff" 0.00
"Frob Time Coeff" 0.00
}
}
}


Didn't had any effect whatsoever. Then I modify it as it was and it worked:

Code: [Select]
++StimSource "Standard Bullet" "Standard Impact"
{
Intensity 8

Propagator "Contact"
{
Shape
{
"Contact Types" "Collision"
"Velocity Coeff" 0.00
"Frob Time Coeff" 0.00
}
}
}

btw Velocity Coeff regards to rate of fire?

Thanks for explaining the ++ So what // stands for. Sorry for making so many stupid question but I want to learn as fast as I can and perhaps help others too.

-Regarding Cameras I found this one
Code: [Select]
// AI->Ability Settings->Camera: parameters
+ObjProp "Security Camera" "AI_Camera"
{
"Scan Angle 1 (deg)" -90.00
"Scan Angle 2" 90.00
"Scan Speed (deg/msec)" 0.05
}

I wasn't using the Editor to try my edits but I'll do from now on. Should I post all my edits for you to check if they're done correctly?

66387ab762c9bvoodoo47

66387ab762ceb
aha, that's because you are editing StimSource, that works slightly differently - you need to specify the ID as well (you will see it in the editor, but not in the dml export), so what you actually need in this case is this:
Code: [Select]
StimSource "Standard Bullet" "Standard Impact" 00900003
{
Intensity 8

Propagator "Contact"
{
Shape
{
"Contact Types" "Collision"
"Velocity Coeff" 0.00
"Frob Time Coeff" 0.00
}
}
}
also, if you want to change just the damage, this would actually be enough;
Code: [Select]
StimSource "Standard Bullet" "Standard Impact" 00900003
{
Intensity 8
}
you can (carefully) omit the code that you do not wish to modify. also, don't use ++ in this case, because that will actually add one more StimSource, so you will have two (one dealing the original 4 damage, and the new one that does 8 damage), instead of one modified that does 8 instead of 4. after loading your original ++ dml into the editor (dbmod_load in the command window), you should be able to see both once you check the StimSource again (that's why loading a freshly constructed dml into the editor to check whether it does what it should is always a good idea).

if you need to know what a prop does, your best bet is to google for it, "dromed thief velocity coeff" in this case, which will land you here. many props are shared between Thief and SS2, so the info should be good.

feel free to post code snippets and ask question, and don't apologize - this is the place to do that, and I'm/I will be answering because I want to, so don't feel sorry or whatever. trust me, I know annoying all too well, and you are not even getting close.
« Last Edit: 17. January 2018, 22:50:57 by voodoo47 »

66387ab762e22marcelo

66387ab762e6e
* EDITED: Alright this is my code snipped so far
Code: [Select]
DML1

//changing og-pipe hitpoints to 46
ObjProp -397 "HitPoints"
{
"" 46
}
ObjProp -397 "MAX_HP"
{
"" 46
}
//changing og-shard hitpoints to 56
ObjProp -4862 "HitPoints"
{
"" 56
}
ObjProp -397 "MAX_HP"
{
"" 56
}
//changing security camera hitpoints to 66
ObjProp -367 "HitPoints"
{
"" 66
}
ObjProp -397 "MAX_HP"
{
"" 66
}
//changing og shotgun hitpoints to 56
ObjProp -175 "HitPoints"
{
"" 56
}
ObjProp -397 "MAX_HP"
{
"" 56
}
//changing blue monkey hitpoints to 36
ObjProp -1431 "HitPoints"
{
"" 36
}
ObjProp -397 "MAX_HP"
{
"" 36
}
//changing red monkey hitpoints to 46
ObjProp -1432 "HitPoints"
{
"" 46
}
ObjProp -397 "MAX_HP"
{
"" 46
}
//changing og-grenade hitpoints to 66
ObjProp -176 "HitPoints"
{
"" 66
}
ObjProp -397 "MAX_HP"
{
"" 66
}
StimSource "Standard Bullet" "Standard Impact" 00900003
{
Intensity 8
}
StimSource "AP Bullet" "Armor Piercing Impact" 00900002
{
Intensity 8
}
StimSource "HE Bullet" "High Explosive" 0090000E
{
Intensity 10
}
StimSource "Wrench" "WeaponBash" 00900029
{
Intensity 3
}
StimSource "Wrench" "WeaponBash" 00900055
{
Intensity 4
}
// AI->Ability Settings->Camera: parameters
+ObjProp "Security Camera" "AI_Camera"
{
"Scan Angle 1 (deg)" -140.00
"Scan Angle 2" 140.00
"Scan Speed (deg/msec)" 0.01
}



i Already figured out weapon damage. Now I'm trying to figure out camera hitpoints, speed and angle.
« Last Edit: 18. January 2018, 00:23:46 by marcelo »

66387ab762f06marcelo

66387ab762f50
Yep. Sorry I totally forgot about the ID part.  O_o Need to fix some stuff.

66387ab763033voodoo47

66387ab763087
apart from the missing IDs, you are also missing a } at the very end of the code snippet, make sure it's there (in the dml). //looks ok after the edit.

the rest looks ok. it's also prudent to add comments so you'll know what's what later, like // doubling the standard pistol damage
« Last Edit: 27. January 2018, 11:17:48 by voodoo47 »

66387ab76311amarcelo

66387ab763164
Yea I edited the post with the dml codes with some fixed stuff.

66387ab763211voodoo47

66387ab763268
note that editing Camera: parameters on the archetype will have no effect, as the concretes already have this prop, overriding the change on the archetype. NVscripting will be required to deploy the modified prop onto the concretes.

66387ab7634c3marcelo

66387ab763518
So I assume the one shot: camera gets yellow alternative can only be achieved via NVscripting as well? I need to check that out.

Btw this is my new gamesys.dml:

Code: [Select]
DML1

StimSource "Standard Bullet" "Standard Impact" 00900003
{
Intensity 2
}
StimSource "AP Bullet" "Armor Piercing Impact" 00900002
{
Intensity 2
}
StimSource "HE Bullet" "High Explosive" 0090000E
{
Intensity 3
}
StimSource "Wrench" "WeaponBash" 00900029
{
Intensity 0.5
}
StimSource "Wrench" "WeaponBash" 00900055
{
Intensity 0.5
}
//changing security camera hitpoints to 8
ObjProp -367 "HitPoints"
{
"" 8
}

Instead of altering AI HP values I decided to leave everything to the impact values of the weapons I wanted to alter except for the camera hp value. So changing HP values was somehow redundant since this were minor changes I wanted to do for my game play. So now it's more simple and cleaner.  :D

This were the initial goals I wanted to achieve in my game play:

1. Nerfing the wrench to be really challenging even at mid strength levels. about 7 to 8 hits to take down an og-pipe. Forcing "manual" fighting (running, dodging)  focus on strength, speed leveling to make the best of it and give Research 1 some space to breathe and be useful.

2. Nerfing the Pistol but still feel stronger than a wrench instead of weaker. About 4 to 5 hits to take down an og-pipe. Also increase rate of fire (Still need to figure out this one).

3. Changing camera reaction to: one standard bullet shot (: camera gets yellow, second shot: camera goes red. (No standard wep training). Still need to figure this one out so I settled for higher Camera hp values.

Hope this changes won't explode in my face later.

 I really like these dml edits cause they're so easy to implement and it wont mess the game data. I also have some secondary goals but I still got a lot to learn.

66387ab763609voodoo47

66387ab763653
you can always remove the dml and everything will revert to the default (even mid game, unless you also deploy props to the concretes, but you are not doing that just yet).

you want the camera to go yellow when taking damage? yeah, a fair bit of NVscripting, I think - might even not be doable (I've never had any success creating artificial AIawareness links - that's probably what you would have to do here). also, I don't think non-integer values are allowed for intensity.

66387ab763726marcelo

66387ab76377a
I changed the intensity value to 0.1 and it does seem to affect damage points compared to 0.5. It took me around 10 hits to take an og pipe down. Tested several times in game. The difference between 0.5 and 0.1 is noticeable.


I also see different cam parameters for cam in the object export file like being able to see corpses, hear sounds, distance etc. Can those be edited through dml or are those part of the concrete as well?


66387ab763887voodoo47

66387ab7638d6
double checked, and float values should be ok for intensity.

doesn't seem like the AI stuff is explicitly set on the camera concretes (check a camera somewhere, obj 93 on medsci1 for example), so it should be ok to just edit the archetype. also, the stuff that's on the concretes can be dml edited as well, just not that easily (either via a mission dml, or force deploying the modified archetype prop value upon startup).

66387ab7639d0marcelo

66387ab763a1a
I managed to make the camera react to shot impacts by setting hearing to "Well Below Average" It works, but not in the exact way i planned.  XD

You can still run and jump behind cameras they won't hear a thing, If you shoot at them from a distance and shoot a wall in their proximity they turn yellow, yet if you hit them they turn red. This also makes cameras very unpredictable but it's fun.  :D

Perhaps lowering the weapon sound could get it closer to turn them yellow when hit?

66387ab763ac8voodoo47

66387ab763b13
who knows - at this point, you just need to dig around things, figuring out what they do and change them around as you deem fit. and yeah, there usually are multiple ways of getting stuff done, and the most obvious ones are usually not the best.

66387ab763bd3marcelo

66387ab763c23
 Is it possible to copy/paste values from one mis to another? Open mis, copy value, close, open another miss, paste value?

66387ab763cffvoodoo47

66387ab763d4b
I don't think so - the laziest thing I've got is to grab the concrete in the editor, copy the props onto its archetype, then export the archetype as dml, and grab the code snippets I want.

but if we are talking strictly editor stuff, then yeah, exporting chunks of levels and then importing them into different levels is possible, see Multibrush (and google Dromed Multibrushing).

66387ab763e2amarcelo

66387ab763e76
I played a bit with the editor and made a few changes to medsci1 to test a few things. Please try it out and let me know what you think. please bare in mind I have no experience with this editor:  http://s000.tinyupload.com/index.php?file_id=01901666686231671731
1 Guest is here.
TURN OUT THE LIGHTS.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
66387ab763f7a