6741cfe7ea9a1

6741cfe7ec1d1
1 Guest is here.
 

Topic: My NewDark Compatibility Wishlist Read 1183 times  

6741cfe7ecd72sarge945

6741cfe7ecdd7
This is mostly a "what if" thread, I doubt the developer of NewDark reads this forum, but if they do, here's what I believe would be some very important/critical features for mod compatibility, since mods are getting more complicated and more compatibility issues are cropping up between various mods as more and more are developed.

To anyone reading this thread, these are not actually usable features, don't use them in your mods. This is just a wishlist of sorts and an attempt to (hopefully) describe what I believe are some limitations of newdark modding.

When (if) the SS2/Dark Engine source becomes available, I would be very glad to help implement all of these.

1. A DML Concatenation operator
This would mainly be used for the DesignNoteSS property. Currently, AFAIK, there's no way for 2 mods to edit the DesignNoteSS property (or any other property) on the same object without conflicts. This is a serious problem because this is the main way for scripts to be setup with parameters, so it's used frequently.

The syntax would look something like this

My Mod:
Code: [Select]
//Some data
+++ObjProp 1234 "DesignNoteSS"
{
"" "myModData1=0;myModData2=0;"
}

+ObjProp 1234 "Scripts"
{
"Script 1" "myScript"
}

Your Mod:
Code: [Select]
//Some data
+++ObjProp 1234 "DesignNoteSS"
{
"" "yourModData1=0;yourModData2=0;"
}

+ObjProp 1234 "Scripts"
{
"Script 2" "yourScript"
}

This would essentially be the equivalent of:

Code: [Select]
+ObjProp 1234 "DesignNoteSS"
{
"" "myModData1=0;myModData2=0;yourModData1=0;yourModData2=0;"
}

+ObjProp 1234 "Scripts"
{
        "Script 1" "myScript"
"Script 2" "yourScript"
}

These mods would still have to manually ensure compatibility, though, because as you can see, I am using script slot 1 and you are using Script Slot 2. Normally this isn't an issue because we can use metaproperties to attach scripts instead, however sometimes objects have the Don't Inherit flag set, in these cases, I would love to have...


2. Automatic Script Slot Assignment

Instead of doing this

Code: [Select]
+ObjProp 1234 "Scripts"
{
"Script 1" "myScript"
}

I should be able to do this

Code: [Select]
+AddScript 1234 "myScript"
{
}

which would automatically add that script to the first available slot, or log a DML error if no slots are available.

3. Partial Strings Support

Currently, if I want to modify a string in my mod, I have to ship an entire strings file. This causes issues, because if we both want to make changes to, say, chargen.str, our mods are inherently incompatible.

Instead, I should be able to ship strings/mymod.chargen.str, containing only my modified strings:

Code: [Select]
Mission4:"Feb. 23, 2113
    Time to get off the UNN Antigua and back to Wake Island Station, and not a month too soon.  Five months into your posting, the Gunnery Sergeant snapped during a training exercise, and killed half a troop with live plasma fire before you tackled her.  After that, you were in charge of the exercises, and in the months after, got pretty good with the low-energy beam weapons.
    You've gained +1 Energy Weapons and +1 Cybernetic Affinity. This mod is really cool"

Meanwhile, you should be able to ship strings/yourmod.chargen.str, containing only your modified strings:

Code: [Select]
Mission5:"Feb. 23, 2113
    Time to get out of the Asteroid Belt and back to Wake Island Station.  You'll probably have nightmares about cramped little tunnels for years, but you and the team got the jobs done.  A combination of EMP grenades and high explosives will stop most hostile machinery, and in your year in the Belt, you got a lot of practice at knocking the 'borgs and 'bots right back to the assembly line.
    You've gained +1 Heavy Weapons and +1 Cybernetic Affinity. This mod is also really cool"

When the game loads, it will read the default strings file, then it will read every partial string file provided in alphabetical order, overwriting any strings it finds. If 2 partial strings files overwrite the same string, the latest one is used.

4. Support for arbitrary/custom properties

Currently, the only way to save data on an object that persists between level transitions is to store the data in an unused property. This has potential for conflicts as mods may use the same properties, and overwriting some properties may have unintended side effects.

If I could instead use Property.Set(myObject,"Some cool custom Property","My Value"), and have it persist like any other property, then I could save all my needed data in my own properties, without having to potentially clash with anything else.

Custom properties would also make feature request #1 less necessary, as script arguments could be stored in custom properties rather than always using DesignNoteSS. Obviously NVScript would still need it, but for custom squirrel it would not be as necessary anymore.

5. Support for physics objects

Currently, using DML to create an object with physics is completely broken. Objects created with DML won't have any physics, and will be able to be walked through as normal.

The current workaround for this is to create a marker in DML and then create the objects dynamically via script.

For example, the Rickenbacker Instant-Death Remover mod adds a pipe to the Rickenbacker forcefield area, which allows the player to "climb out" if they miss the jump.

This should be possible using some pretty standard DML:

Code: [Select]
//Create Pipe
Create -1050
{
+ObjProp "Position"
        {
"Location" "-214.179, -47.2608, 40.12"
"Heading" 0
"Pitch" 0
"Bank" 2724
        }
}

However, this is completely broken. It will create the pipe at the correct location, but it will have no physics whatsoever. The player will phase through the object as if it doesn't exist.

Currently, the only way to create a physical object using DML is to create a marker and then use a script to spawn the object at the right position. For example:

DML
Code: [Select]
//Create Pipe
Create "Marker"
{
+ObjProp "Position"
{
"Location" "-214.179, -47.2608, 40.12"
"Heading" 0
"Pitch" 0
"Bank" 2724
}

+ObjProp "Scripts"
{
"Script 0" "rickObjectPlace"
"Don't inherit" false
}
}

Squirrel:
Code: [Select]
class rickObjectPlace extends SqRootScript
{
//Run Once
function OnBeginScript()
{
local created = Object.Create(-1050);
Object.Teleport(created, Object.Position(self), Object.Facing(self));
Object.Destroy(self);
}
}
« Last Edit: 18. November 2024, 12:43:04 by sarge945 »
Acknowledged by: RoSoDude
1 Guest is here.
The 3 Rs stand for Rainalkar, Rainalkar's Room-mate and RocketMan.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
6741cfe7edc4d