Home » FULL CONTROL GAMES » #JAFDEV Modders Corner » Modding FAQ
Modding FAQ[message #332689] Fri, 16 May 2014 16:00 Go to next message
Shanga is currently offline Shanga

 
Messages:3482
Registered:January 2000
Location: Danubia
Please post here if you have extra info about the editor (from own experience). Or anything modding related.

I'll start first:


  • There are no real roofs yet. You can either leave your building with no roof or use the asset they call Fake Roof, which is basically a transparent layer that prevents light to come in (but leave the contents of the house visible).
  • Editing the ground textures is a little buggy and even if you make new textures that work, they don't automatically get in the game. Need some coder with Unity experience to write a small how-to on this, please.
  • We also need more house textures that fit JA2 settings (wood huts). So far the only set of walls that's complete (broken walls and debris included) is the wall_commercial and maybe prison.
  • Doors are just static decorations so make sure they're open. If you place them closed that room won't be accesible.
  • You can place assets up to the yellow line, they will be accesible. Anything after that limit should be only decorative (such as cliffs or water.

I'll keep adding to this when I get new ideas. FYI the Steam EA doesn't quite work with the editor because they changed the path to the game. And they forgot to patch the editor. So we need to wait for a fix.

Report message to a moderator

Captain
Re: Modding FAQ[message #332698] Fri, 16 May 2014 19:50 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3482
Registered:January 2000
Location: Danubia
FIXED EDITOR:

http://www.jaggedallianceflashback.com/uploads/JAFPublicEditor.zip

Regarding modding (from Thomas Lund)

Quote:

Lua Interface:

This is the current documentation for the scripting interface that is added:
https://dl.dropboxusercontent.com/u/2994227/JAFTXLuaScriptingReference.pdf

You can use this almost from any other subsystem as well as from the console (shift+') or something. Shitty key combo that we will change soon.

For almost all subsystems goes that there is a
- condition
- effect

The condition can be seen as the inside of an if then statement in Lua. If true, then that particular part of the dialog, logic trigger etc is run. And if a node has an effect script, then that effect is executed.


Dialog system:

Files are in StreamingAssets/Original/Data/Dialogs.
The easiest way to create these is to use ChatMapper (http://www.chatmapper.com/). We have a template that shows the minimal fields required, but we run off almost default. The only field added is really a ConversationID field on the Conversation itself, so there is a human readable / level designer friendly string ID to use inside the game.

The system requires the player to be "conversant" id 1 and the NPC to be id 2.

Export it to json and its directly loadable in the game. And for those that dont have ChatMapper, basing it off json makes it easy to mod. Although the chatmapper exporter adds way too many unused fields. Try to run through those examples in the current story to see how it works.


Quest system:

Files are in StreamingAssets/Original/Data/Quests.
One file per quest. Quest can have optional goals. No editor yet, but the files are as small as possible and almost self explainatory.


Memory system:

Right now a basic string, string dictionary, where you can get/set key+value variables to be used in the logic elsewhere. So you can set a variable when talking to Spice, so that later another NPC dialog can check if you talked to him or not and branch the dialog options.


Story system:

A series of "full screen panels" that have an image, a title and a text. Used for showing the intro story and similar. Will also be used later to show the game interface tutorial. One file per story, ultra simple system


Random NPC/enemy names/responses

There are 2 files here that contain all the *random* NPC and enemy soldier names. For non-story characters the system randomly pulls a name and response to a unit when created and uses it for that game session.


What else?
Additionally we have exposed (and will continue exposing) game variables inside GameRulesSettings.json. These are all the "magic" values - AP cost for shooting, number of shots per burst, accuracy modifier for sustained fire etc.etc.etc. Go nuts modifying these!

Report message to a moderator

Captain
Re: Modding FAQ[message #332699] Fri, 16 May 2014 19:55 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3482
Registered:January 2000
Location: Danubia
Quote:

Initial Setup

1. Download and install Unity (https://unity3d.com/unity/download)
2. Download the LevelEditor project (for now distributed privately only to modders)
3. Unzip JAF Editor.zip to a folder of your choice.
4. Open Unity and open the LevelEditor project : Open Project >
Select "JAF Editor" folder (root folder of
unzipped file). Opening the project will take some time, as it reimports the assets from the project this will only happen on the first startup though.
5. Set up the reference to the JAF games folder. You will only need to do this only once:

Open the Unity preferences (Edit > Preferences on Windows and (Unity >Preferences

Report message to a moderator

Captain
Re: Modding FAQ[message #332705] Sat, 17 May 2014 00:10 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3482
Registered:January 2000
Location: Danubia



[Updated on: Sat, 17 May 2014 00:10] by Moderator

Report message to a moderator

Captain
Re: Modding FAQ[message #332706] Sat, 17 May 2014 00:10 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3482
Registered:January 2000
Location: Danubia
Modded ZOOM-IN factor. Check GameSettings.json and edit cameraFOVMin and cameraFOVMax.

{
  "Camera": {
    "cameraFOVMin": 10.0,
    "cameraFOVMax": 45.0,
    "defaultDistance": 0.0,
	"zoomSpeed": 1.0,
	"keyPanSpeed": 10.0,
	"edgePanSpeed": 4.0
  }
}

Report message to a moderator

Captain
Re: Modding FAQ[message #332803] Mon, 19 May 2014 02:55 Go to previous messageGo to next message
zippythezip is currently offline zippythezip

 
Messages:38
Registered:January 2013
Location: Nova Scotia, Canada
Shanga
Modded ZOOM-IN factor. Check GameSettings.json and edit cameraFOVMin and cameraFOVMax.

{
  "Camera": {
    "cameraFOVMin": 10.0,
    "cameraFOVMax": 45.0,
    "defaultDistance": 0.0,
	"zoomSpeed": 1.0,
	"keyPanSpeed": 10.0,
	"edgePanSpeed": 4.0
  }
}


Thanks for that, that makes the game better for me.
Now I hope for a graphics mod, not a fan of how it looks at all.

Report message to a moderator

Private 1st Class
Re: Modding FAQ[message #333054] Sat, 24 May 2014 03:03 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3482
Registered:January 2000
Location: Danubia
My DDS texture guide:

Modding textures in JA:F

1. Google UnityAssetsExplorer-1.2. It's a free unpacker/packer for Unity assets.
2. Install the free graphics editor Paint.NET (the only editor that has inbuilt DDS support).
3. Open in AssetExplorer resources.assets
4. Make sure Export TEX to DDS is checked.
5. Extract the assets while making sure "Export TEX to DDS" is checked.
6. Get back to the folder where you extracted AssetsExplorer and find the DDS you want to edit (AK-47.tex.dds for example).
7. Open the DDS in Paint.NET and make yourself that pink AK you always craved for.
8. Save DDS are DXT5 (Interpolated Alpha). DO NOT CHANGE THE SUGGESTED NAME (if dds was saved as AK-47.tex.dds keep it just like that).
9. Go back to AssetExplorer and open the .asset file again. Look up AK-47. tex file. Right-click it and select "Import this file from DDS".
10. Save everything (Save as Assets file)
11. Enjoy your new toy in game.

Below you can see how my Gold AK texture looks. Very rough, but works as a test. If I had to make it look pro I would've probably hand painted it.

https://scontent-b-fra.xx.fbcdn.net/hphotos-ash4/t1.0-9/p403x403/10296752_446239045511561_4389306269591787579_n.jpg

Report message to a moderator

Captain
Re: Modding FAQ[message #333055] Sat, 24 May 2014 03:06 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3482
Registered:January 2000
Location: Danubia
New JA:F modding guide, including and how-to on making your own assets!!!


Quote:
Creating New Assets
You can create your own assets to be placed in your sector.
An asset in JA:F is nothing but a prefab (see Unity documentation[docs.unity3d.com]) that has the AssetView component attached to the root GameObject.

(1) Open the WorkbenchScene included with the Editor project
(2) Create an empty GameObject. This will be the root of your asset
(3) Name it something meaningful.
(4)Add your content as a child of this object and place it correctly in the local coordinates.
(5) Drag the root of your Asset into the project view to make it a prefab.
(6)Select the newly created prefab in the project panel.
(7) Go into Debug mode by opening the drop-down menu right next to the lock icon in the top of the inspector panel.
(Cool Click

[Updated on: Sat, 24 May 2014 03:09] by Moderator

Report message to a moderator

Captain
Re: Modding FAQ[message #333056] Sat, 24 May 2014 03:11 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3482
Registered:January 2000
Location: Danubia
This is where I am pushing FC to come up with a solution cause no way in hell a modder should pay 1500 euro to make free mods:

Quote:

Note: This requires a Unity Pro license

Creating an AssetBundle

In order for the game to use custom created assets, you need to build an AssetBundle containing your assets and put it to your Mod folder.

[Updated on: Sat, 24 May 2014 03:12] by Moderator

Report message to a moderator

Captain
Re: Modding FAQ[message #333132] Mon, 26 May 2014 12:34 Go to previous messageGo to next message
sardonic_wrath is currently offline sardonic_wrath

 
Messages:48
Registered:June 2011
Agree on the Unity pro thing, I also said this a while back. Seems they will need code something that can parse 3d meshes at runtime. While that might not be a big problem (you can also get those someone elses importer for free or cheap), It might be a bit more complex because we also need them in the editor, and the editor is used to assign game logic (e.g. cover) to it.
Lets see what they come up with.


On the topic of texturing, I did a bit of modding for Mount&Blade for a while, what I used for DDS was photoshop with this plugin:
https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop

Especially once it comes to texturing our own models and not just retexturing FC's, there are quite nice and little known 3d features in photoshop:
you can load your meshes (can't remember which formats are supported) into photoshop, rotate them, preview your texture files on them, even paint directly on the model and get those changes in the texture file.

Report message to a moderator

Corporal
Re: Modding FAQ[message #333133] Mon, 26 May 2014 12:54 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3482
Registered:January 2000
Location: Danubia
That's a bloody nice plugin then

But for FC's DDS files only Paint.NET worked.,

Report message to a moderator

Captain
Re: Modding FAQ[message #333136] Mon, 26 May 2014 13:47 Go to previous messageGo to next message
sardonic_wrath is currently offline sardonic_wrath

 
Messages:48
Registered:June 2011
To be clear, the plugin only provides DDS export, the 3D functionality is part of photoshop since version CS4 (I think)

Shanga
But for FC's DDS files only Paint.NET worked.,

Huh, thats weird...

Can't wait to try some modding myself, hope FC get this Beta-Upgrade coupon thing on track soon...



Report message to a moderator

Corporal
Re: Modding FAQ[message #333168] Tue, 27 May 2014 05:48 Go to previous messageGo to next message
Kaerar is currently offline Kaerar

 
Messages:2022
Registered:January 2003
Location: Australia :D
Should mention GIMP also supports DDS files.

Personally I use Photoshop as it's much better but then I've used it for 14 years now Wink

Report message to a moderator

Lieutenant

Re: Modding FAQ[message #333197] Tue, 27 May 2014 14:02 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3482
Registered:January 2000
Location: Danubia
For World of Tanks I used Gimp and Photoshop just fine. For JAF neither work. If someone manages to get JAF DDS files to work in Photoshop, I'd appreciate a short how-to. Not that I hate Paint.NET. It's free and pretty nice.

Report message to a moderator

Captain
Re: Modding FAQ[message #333200] Tue, 27 May 2014 15:57 Go to previous messageGo to next message
rummtata is currently offline rummtata

 
Messages:103
Registered:April 2011
Location: Germany
@Shanga: I use the NVIDIA plugin for .dds files (https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop) and it has worked well so far. What is the problem with JA:F textures?

Report message to a moderator

Sergeant
Re: Modding FAQ[message #333206] Tue, 27 May 2014 20:48 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3482
Registered:January 2000
Location: Danubia
I use the same plugin. No idea what's so special about these DDSs, all I know Photoshop says it can't open/recognize them. Or maybe i messed up my install and forgot to reinstall the plugin...all I know Paint.NET worked out of the box and that's enough for JAF modding.

Report message to a moderator

Captain
Re: Modding FAQ[message #333267] Thu, 29 May 2014 11:43 Go to previous messageGo to next message
sardonic_wrath is currently offline sardonic_wrath

 
Messages:48
Registered:June 2011
I think its more interesting if JAF can read DDS files from gimp and photoshop. Anyway, hope I'll find time to investigate this later to day.

How is going with the modding adivisory panel? Is there a behind-the-scenes forum or something like that?

For now modding is off to a very good start. Though I hope the LUA scripting will be heavily expanded, to allow us to do all those neat little systems we got in 1.13 over the last years. Thats were its really at...

The possibilty to alter UI elements and design our own is one thing that would be very important, I think.

The dream would be if we could do really complex stuff like New attachment system, or NCTH, which I'm a big fan of (The concept, not necessarily the implementation)

Also, I recently had the thought that it would be good if containers within maps (chests etc.) weren't filled using the map editor, but assigned IDs and populated/filled (perferably with random elements) via external script/config.
With random elements it would be nice for replayability, but most imporantly it would allow to combine item-mods with map-mods with much less effort.
From what I read that is always quite a hassle with ja2.

Report message to a moderator

Corporal
Re: Modding FAQ[message #333270] Thu, 29 May 2014 11:58 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3482
Registered:January 2000
Location: Danubia
There is a dev+modders forum, everyone is studying the bits and pieces they feel more comfortable with.

There's no need for randomization of the maps, imho. This is not JA2 editor. Here you can save whatever items you want as a group, from a few trees to a block of houses and copy paste them anywhere you want. It's not like you need an hour to produce a new sector, it's a job that can be done in minutes.

[Updated on: Thu, 29 May 2014 11:59] by Moderator

Report message to a moderator

Captain
Re: Modding FAQ[message #333273] Thu, 29 May 2014 12:53 Go to previous messageGo to next message
sardonic_wrath is currently offline sardonic_wrath

 
Messages:48
Registered:June 2011
Great to hear, would love to have a peak, but I trust you guys will make sure they are doing it right and keep us posted Smile

I don't think we are on the same page here, when I say items I mean inventory stuff. Would be nice if you'd find different stuff in crates, chests, lockers on differnt playtroughs. What I am suggesting is to give assign an ID and a class (kitchendrawer, military crate, weaponlocker, etc...) in the editor, and use external config files to determine what should go in there.
This would function as a connecting piece between mods that purely deal with weapons and stuff, and those that deal only with maps, so that they can easily be combined.
(just a rough concept, haven't thought everthing trough)

I agree on the randomization of maps, not really necessary. Though FCs core engine supports it apparently: https://www.youtube.com/watch?v=lxfSoLYXQAM
Who knows, maybe we will see this somewhere down the road. Could be nice in the editor to start with a random landscape instead of a blank canvas.

[Updated on: Thu, 29 May 2014 12:54] by Moderator

Report message to a moderator

Corporal
Re: Modding FAQ[message #333275] Thu, 29 May 2014 13:26 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3482
Registered:January 2000
Location: Danubia

Maybe it can be done, the sector items are in the JSON files. Still, easy to place by hand and safer.

Report message to a moderator

Captain
Re: Modding FAQ[message #333300] Thu, 29 May 2014 22:00 Go to previous message
Kaerar is currently offline Kaerar

 
Messages:2022
Registered:January 2003
Location: Australia :D
Damn I need more time, I'm modding too much at the moment! DayZ servers, X3 Albion Prelude (last 3 years!) NFS Shift 2, now JAF's here, Star Citizen on the horizon. I'm getting torn in far too many directions Very Happy

Report message to a moderator

Lieutenant

Previous Topic: JAF Editor for download anywere?
Goto Forum:
  


Current Time: Fri Mar 29 08:22:31 GMT+2 2024

Total time taken to generate the page: 0.02465 seconds