mirror of
https://ceregatti.org/git/daniel/dayzdockerserver.git
synced 2025-05-06 14:21:18 +00:00
Fix cfgGameplay.json hack.
Update docs.
This commit is contained in:
parent
39ab84f338
commit
cd308e1f96
2 changed files with 50 additions and 11 deletions
|
@ -5,14 +5,47 @@
|
|||
The files used to integrate the [HypeTrain mod](https://steamcommunity.com/sharedfiles/filedetails/?id=3115714092) came from
|
||||
[here](https://steamcommunity.com/workshop/filedetails/discussion/3115714092/4032475029247848861/).
|
||||
|
||||
## Install
|
||||
## Mod Integration Files
|
||||
|
||||
5 files are required to run the mod. Two are map-specific and the rest are common to all maps. They are:
|
||||
5 files are required to run the mod. Two are map-specific and the rest are common to all maps:
|
||||
|
||||
* `cfgeventgroups.xml` - This is map-specific. The one included in this repository is for Chernarus.
|
||||
* `cfgeventspawns.xml` - Same as above.
|
||||
* `cfgspawnabletypes.xml` - Common to all maps.
|
||||
* `events.xml` - Common to all maps.
|
||||
* `types.xml` - Common to all maps.
|
||||
These are map-specific. The ones included in this repository is for Chernarus.
|
||||
* `cfgeventgroups.xml`
|
||||
* `cfgeventspawns.xml`
|
||||
|
||||
These files are commong to all maps:
|
||||
|
||||
* `cfgspawnabletypes.xml`
|
||||
* `events.xml`
|
||||
* `types.xml`
|
||||
|
||||
The `start.sh` script is for doing extra stuff, but programatically. See the comments within it for details.
|
||||
|
||||
## Generic Mod Installation (Windows)
|
||||
|
||||
Using the [Central Economy](https://community.bistudio.com/wiki/DayZ:Central_Economy_mission_files_modding) method:
|
||||
|
||||
* Create a new folder in your mpmissions map folder. Name it HypeTrain.
|
||||
* Put the 3 files common to the server in that folder
|
||||
|
||||
```
|
||||
+C:\
|
||||
+DayZ Server
|
||||
+mpmissions
|
||||
+dayzOffline.chernarusplus
|
||||
+HypeTrain
|
||||
-cfgspawnabletypes.xml
|
||||
-events.xml
|
||||
-types.xml
|
||||
```
|
||||
Edit the server's `cfgeconomycore.xml` and add the following under `<economycore>`:
|
||||
|
||||
```
|
||||
<ce folder="HypeTrain">
|
||||
<file name="cfgspawnabletypes.xml" type="spawnabletypes"/>
|
||||
<file name="events.xml" type="events"/>
|
||||
<file name="types.xml" type="types"/>
|
||||
</ce>
|
||||
```
|
||||
|
||||
The other two files must be manually merged to the mpmissions equivalents:
|
||||
|
|
|
@ -146,6 +146,10 @@ mergexml(){
|
|||
-o -name "cfgweather.xml" \
|
||||
-o -name "init.c" \
|
||||
\) -exec cp -v {} ${SERVER_FILES}{} \;
|
||||
|
||||
# FIXME!!! HACK to account for cfgGameplay mixed case
|
||||
cp ${MPMISSIONS}/${MAP}/cfggameplay.json ${MPMISSIONS}/${MAP}/cfgGameplay.json
|
||||
|
||||
# Follow https://community.bistudio.com/wiki/DayZ:Central_Economy_mission_files_modding
|
||||
# Remove any existing files, via the mod_ and custom_ prefixes
|
||||
rm -rf ${MPMISSIONS}/${MAP}/mod_*
|
||||
|
@ -222,10 +226,11 @@ mergexml(){
|
|||
fi
|
||||
echo "Merge JSON '${WORKSHOP_DIR}/${ID}/${var,,}.json' -> '${MPMISSIONS}/${MAP}/${var,,}.json'"
|
||||
rm -f /tmp/x /tmp/y
|
||||
jq -s '.[0] * .[1]' ${MPMISSIONS}/${MAP}/${var,,}.json ${WORKSHOP_DIR}/${ID}/${var,,}.json > /tmp/x
|
||||
# mv /tmp/x ${MPMISSIONS}/${MAP}/${var,,}.json
|
||||
# FIXME: This is a hack to fix the JSON file, as it expects mixed case
|
||||
jq -s '.[0] * .[1]' ${MPMISSIONS}/${MAP}/cfgGameplay.json ${WORKSHOP_DIR}/${ID}/${var,,}.json > /tmp/x
|
||||
mv /tmp/x ${MPMISSIONS}/${MAP}/cfgGameplay.json
|
||||
# jq -s '.[0] * .[1]' ${MPMISSIONS}/${MAP}/${var,,}.json ${WORKSHOP_DIR}/${ID}/${var,,}.json > /tmp/wtf
|
||||
# mv /tmp/x ${MPMISSIONS}/${MAP}/${var,,}.json
|
||||
fi
|
||||
done
|
||||
# These are merged directly into the upstream file, but are C
|
||||
|
@ -319,9 +324,10 @@ mergexml(){
|
|||
fi
|
||||
echo "Merge JSON '${SERVER_PROFILE}/custom/${dir}/${var,,}.json' -> '${MPMISSIONS}/${MAP}/${var,,}.json'"
|
||||
rm -f /tmp/x /tmp/y
|
||||
jq -s '.[0] * .[1]' ${MPMISSIONS}/${MAP}/${var,,}.json ${SERVER_PROFILE}/custom/${dir}/${var,,}.json > /tmp/x
|
||||
# mv /tmp/x ${MPMISSIONS}/${MAP}/${var,,}.json
|
||||
jq -s '.[0] * .[1]' ${MPMISSIONS}/${MAP}/cfgGameplay.json ${SERVER_PROFILE}/custom/${dir}/${var,,}.json > /tmp/x
|
||||
mv /tmp/x ${MPMISSIONS}/${MAP}/cfgGameplay.json
|
||||
# jq -s '.[0] * .[1]' ${MPMISSIONS}/${MAP}/${var,,}.json ${SERVER_PROFILE}/custom/${dir}/${var,,}.json > /tmp/x
|
||||
# mv /tmp/x ${MPMISSIONS}/${MAP}/${var,,}.json
|
||||
fi
|
||||
done
|
||||
if [[ ${FOUND} = 1 ]]
|
||||
|
|
Loading…
Add table
Reference in a new issue