Giter Site home page Giter Site logo

opennaja / cobra-tools Goto Github PK

View Code? Open in Web Editor NEW
92.0 15.0 27.0 66.77 MB

A suite of GUI tools for extracting and modifying OVL and OVS archives, as well as editing the associated in-house file formats. Also includes a model plugin for Blender. For downloads, guides, and FAQs visit:

Home Page: https://opennaja.github.io/cobra-tools/

License: GNU General Public License v3.0

Python 100.00% Lua 0.01%
blender blender-addon game-development games modding modding-tools

cobra-tools's Introduction

cobra-tools

"Life Modding finds a way."

A simple GUI for extracting OVL and OVS archives and modifying their contents, as well as editors for the associated in-house file formats. Also includes a model plugin for blender.

Installation

Read the instructions steps carefully and do not jump ahead and start downloading everything or you will miss important steps.

Get the latest source code here and unzip to a folder of your choice.

Installing Prerequisites

You need to have installed:

Installing Python dependencies

Opening any of the GUI tools after installing Python 3.11 and the redistributables will auto-install the Python dependencies for you. You may also be prompted to update outdated packages.

Simply follow the instructions, typing y and hitting Enter.


If you would like to install the dependencies manually:

  1. Open the Cobra Tools folder in Windows File Explorer.

  2. In the File Explorer address bar, type cmd and hit Enter. This will open a command prompt in your Cobra Tools folder.

  3. In the command prompt type the following line and hit Enter

    pip install --upgrade pip && pip install -r requirements.txt
    

    Please note: If you do not open cmd in your Cobra Tools folder, you will need to provide the full path to requirements.txt
    Note: You may need to upgrade pip using python.exe -m pip install --upgrade pip instead.

Blender Plugin Installation

Currently the tools work in blender 3.6 to 4.0.

Developers

If you are contributing to the project, in addition to installing requirements.txt:

  1. Install the dev requirements. From cobra-tools directory run:

    pip install --upgrade pip && pip install -r requirements-dev.txt
    

    Note: You may need to upgrade pip using python.exe -m pip install --upgrade pip instead.

  2. Then install the pre-commit hooks:

    pre-commit install -f
    

How to use

Basic Tutorials

Disclaimers

  • Remember to backup all mod files and stock files. Any patches will reset or break the mods and will need to be redone and re-released.
  • Not all model files are supported at this time. Some may crash on import or export. Even if they (seemingly) import and export fine, the result is not guaranteed to work ingame.

Legal Notice and Terms Of Conduct

This software is developed under 'fair use' by enthusiasts and is not affiliated with Universal© or Frontier® in any form.

By downloading and using this software, you agree to the following conditions:

  • Use this software at your own risk. It may cause damage to you, your equipment or your data. The authors are not responsible for your actions.
  • Do not use this software to circumvent copy protections. Especially, do not try to unlock downloadable content for free, share official artwork or intellectual property or engage in so-called data mining to announce game content before an official announcement.
  • Do not seek monetary compensation for mods made with this software. Do not charge money or ask for donations in order to download the mods. Do not accept payment in exchange for exclusive rights (even if temporary) to commissioners of mods.
  • Secure permission to use other parties' work in your mods. This includes but is not limited to using IP, artwork, skin designs and 3D models (eg. porting models from another game). If you don't have the approval of the copyright holder(s), be prepared to face the consequences.
  • Porting models when done without strict permission should not seek for monetary compensation. This means that using the tool to re-publish other's work should not be done for profit, but for the modding community. Ported models mods must be opt-out of any direct revenue. General donations for the work done are still fine, as long as they are not tied to any specific port mod.
  • Do not affect online modes of the game drastically using this software. Do not try to gain any advantage over other players. Online gameplay and modifications should be restricted as much as possible and not encouraged.

If you still have doubts, consider checking the official Frontier's Mod Policy.

Credits

  • Planet Zoo, Cobra, Frontier and the Frontier Developments logo are trademarks or registered trademarks of Frontier Developments, plc.
  • Jurassic World, Jurassic World Fallen Kingdom, Jurassic World Evolution, Jurassic World Evolution 2 and their respective logos are trademarks of Universal Studios and Amblin Entertainment, Inc.
  • Daemon1, DennisNedry1993 and Inaki for initial modding attempts and documentation.
  • mpeterv for luacheck
  • texconv from DirectXTex is used internally to convert to and from DDS textures.

Get in touch

Some Discords where modding progress is discussed can be found here:

cobra-tools's People

Contributors

candoran2 avatar cx-koraka avatar dependabot[bot] avatar distantz avatar harlequinzeg0 avatar hendrix-zt2 avatar hexabits avatar ilodev avatar portalmaster137 avatar poslovitch avatar reddraconi avatar skyducks avatar sleepyengi avatar toxicantidote avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cobra-tools's Issues

Improve workflow for editing models from multi-model archives

Consider the case where one ovl has several ms2 buffers with several mdl2s in each.

Merger tool is complicated and not transparent about which models one has to merge. Maybe store the associated mdl2s in each ms2. Redundant since we store the ms2 name in the mdl2 already, but this would allow us to select a ms2 and check which mdl2s we need to locate so we can update them.

Could delay merging implicitly to importing and do it on the fly; potentially dangerous and could slow down injection a bit.

Bulk Txt injection causes trouble

Probably padding is not 100% correct.
Proposed fix - store old padding (with OSUD etc) and then pad the result to multiples of 8 bytes:
pointer.update_data(new_txt_bytes+pointer.padding, pad_to=8)

Matcol for Indom has odd padding

m1_d0 = struct.unpack("<8I", m1.pointers[0].data)
m1_info_count = m1_d0[2]

expected 16 bytes of data, got 24 bytes instead on last attribute count frag in the list.

FGM Finding: pDecayNormalConstrastScale

Only tested on JWE dinosaurs, while editing their main fgm file, in this case "ouranosaurus.fgm", there is a section focused on the decay attributes for the model, diffuse color, normal map intensity, etc etc, the one that i tested was the pDecayNormalConstrastScale, which changes how intense the normals become on the dead body, the default value is 1,500 while i tested with 5,000; not sure if there's a limited value so far
c9009b10513eee62088e2854bb4befc5
2923a09bb1ea121c7ee902fc337e9e47

OVL tool does not correctly detect Python 3.8

The check_version function in ovl_tool_gui.py does not correctly detect Python 3.8, and reports "Python 3.7.6+ x64 bit is expected".

This is a quick one-line fix in the function as follows:

	@staticmethod
	def check_version():
		is_64bits = sys.maxsize > 2 ** 32
		if not is_64bits:
			widgets.showdialog("Either your operating system or your python installation is not 64 bits.\n"
							   "Large OVLs will crash unexpectedly!")
		if sys.version_info[0] != 3 or sys.version_info[1] < 7 or (sys.version_info[1] == 7 and sys.version_info[2] < 6):
			widgets.showdialog("Python 3.7.6+ x64 bit is expected!")

Note that this won't accept Python 4.x if it ever happens, but that seems like a safe option.

MS2 - Joint infos

mod_rf_stairwell has 1 jointdata, with 1 joint, with 1 hitcheck, with 1 bbox

Extracting Content0 Main.ovl causes an error

Attempting to open Main.ovl from the Content0 folder causes an unspecified error which prevents the file from being successfully opened. No error is displayed in the console. Usually but perhaps not always this happens in the "Mapping pointers" stage. All other ovl files I've tried open fine.

error

Version: 1.3.0 release

I don't know if this error happens on just my machine. Two problems I've ruled out: I'm not running out of RAM, and my ovl file is not corrupt (redownloaded it from Steam just to be sure).

FGM Editor experimentation findings

Here's what I've found so far from changing values in the FGM editor

AlphaTestRef: The higher this value, the faster transparent materials will fade into becoming invisible as you move away from them.

gWetBrightness: The higher this value, the brighter the diffuse texture becomes when the animal is wet.

pDirtDryColour: RGB values divided by 1000 that slightly affect the color when the animals are muddy
pDirtWetColour: RGB values divided by 1000 that slightly affect the color when the animals are wet

pRenderLayersOveride: I saw no visible changes when changing this value.

pTransmittance: normally 0, a value of 1 makes light go through the object so shadows are removed, but the object remains opaque.

pWetSpecularStrength: Makes the model more reflective while wet independently of the blue value of the roughnesspacked texture

pMaximumSnowAmount: No visible change.
fgm findings

FGM Editor purpose: psublayer0diffuseTint

Attribute is found in Rocks_Ice.ovl, rocks_01_mat.fgm.
Attribute is "psublayer0diffuseTint" followed by 3 number values which correspond to RGB in a 0-1 scale. It tints the diffuse texture to whatever rgb you input. Used it to make the notoriously blue ice rocks white. Tooltip could read "Tints the indicated diffuse layer to the specified rgb value".

Screenshot (54)
Screenshot (55)

Font problem of the game

Hello, I searched google but haven't solved my problem yet.
I am looking for the font file of the game. Because I want to translate the game's language into Vietnamese but the game's font file does not support my language.
If you know where the font file is, please help me ...
Thank you so much.

Juvenile Indian Elephant OVL saved successfully; crashes Planet Zoo upon loading save file immediately.

Tested both after editing a texture and saving, and not editing anything and saving. The game crashes upon loading any save file. No errors were shown during the saving process of the OVL.

Notes:
-Other juvenile models did work upon saving with or without edits.
-The juvenile model for the indian elephant has fur shaders, unlike the adult versions of itself.
-The unpacked files for the juvenile indian elephant included files that no other furry animals include when unpacked, an opacity texture for the fins, and a diffuse texture for the fins. Animals like the juvenile gray wolf and the grizzly bear did not have any of these textures despite having fur shaders.
-upon using a backup of the original juvenile indian elephant OVL, the save file loads correctly. But just opening it with the OVL editor, and saving it, causes the game to crash upon loading. Even without changing anything.

OVl tool buffer?

I tried to use the OVL tool to extract OVL files from Jurassic world evolution, however when I try to unpack the files it comes up with an error saying it requires a buffer of 4 bytes. I cannot find answers for this anywhere and I have no clue how to solve this

Extract as .db instead of .fdb

It's a minor thing, but I find regular SQL editors are easier to work with (I think .fdb uses firebird or something? I just know I can't open them with my regular editors, so I need to quickly change the extension to .db before editing). Makes small changes to mods a whole multi-step process (extract, change fdb to db, edit using SQL database viewer, change back to fdb, inject, save - easy to miss a step by accident).
Takes just a few lines across 3 files to change that:

in ovl_tool_gui.py:__init__:
replace:
supported_types = ("DDS", "PNG", "MDL2", "TXT", "FGM", "FDB", "MATCOL", "XMLCONFIG","ASSETPKG","LUA")

with:
supported_types = ("DDS", "PNG", "MDL2", "TXT", "FGM", "FDB","DB", "MATCOL", "XMLCONFIG","ASSETPKG","LUA")

in extract.py:write_fdb(): right after,
name = sized_str_entry.name

add:

if (name[-4:] == ".fdb"):
     name = name[:-4] + ".db"

in inject.py:inject(): on the next line after,
for file_path in file_paths:

replace:
name_ext, name, ext = split_path(file_path)

with:

path_in_ovl = file_path
if (path_in_ovl[-3:] == ".db"):
	path_in_ovl = path_in_ovl[:-3] + ".fdb"

name_ext, name, ext = split_path(path_in_ovl)

Haven't had the chance to fully test if I missed something, but this seems to work for my JWE mod, and makes it a bit more streamlined to update.

AttributterError: 'int' object has no attribute write - while injecting .fgm

For Jurassic World Evolution, while injecting water.fgm into DefaultWater.ovl, AttributeError is catched:
"int object has no attribute write"

the exception is generated in: def to_bytes(inst, data), in file: /modules/inject.py

the simple fix is to just add:

	if isinstance(inst, int):
		return inst.to_bytes(4, 'little')

but for this, additional testing is needed to check if int to be injected needs to be 4 bytes (or 2, or possibly 8), and whether the storing of .ovl file is big or little endian.

Header data padding

General issue to keep track of all header pointer related padding issues.

Program won't launch

I have C++ and Python installed, but opening ovl_tool.bat a window briefly flickers then closes. Launching as administrator had no effect.

Is there something I should change in the config file? Does it matter what drive I have the program on?

Plugin - Matcol height blend scale

Documentation of effects of height blend scale tuple:

layer0 is white top to bottom black
layer1 is white right to left black

0,0 texture0
grafik

-10,0 texture0
grafik

-10,0 texture1
grafik

10,0, tex1
grafik

-10,0 tex1
grafik

0,0 tex1
grafik

0,10 tex1
grafik

0,-10 tex1
grafik

FGM Finding: pColourMask_HSLGentic0

Tested in Planet Zoo with the female American bison. It only appears to have an effect when viewing the animal from a distance, and there were frequent crashes.
The specific file I tested was american_bison_female_fur.fgm.
Setting all 3 variables to 1.000 resulted in a mint green colouring.
Planet Zoo 2020-01-04 3_15_51 PM
Setting the left variable to 0.700, the middle variable to 0.950, and the right variable to 0.500 resulted in a yellow colouring.
Planet Zoo 2020-01-04 3_20_01 PM
This finding indicates that the left variable is green, the middle is red, and the right is blue.

Electric Tour Issue

Having a problem opening the .MDL2 file to the Electric Tour. This is my error.
christ2
Anyone know whats going on here ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.