Tutorial for getting a prefab into the game as a selectable unit (FILES EXPLAINED)
#1
Posted 15 September 2015 - 11:52 PM
#2
Posted 16 September 2015 - 07:49 PM
Very nice to see some help with this. In the process of trying it with the little free time I have. Let you know the outcome. Thanks for the hard work of trying it all out
William: In this part
#3
Posted 16 September 2015 - 09:19 PM
Good luck
William516
Bill
Delaware, USA
#4
Posted 16 September 2015 - 09:54 PM
#5
Posted 17 September 2015 - 04:50 PM
OK after a huge headache of looking through tons of files I finally have figured out what controls the different windows; however, it will take someone with some more coding experience then me to figure out what to do with these files.
So far the menus are controlled by three types of files that I can find and reference.
.RCSS - files (can be opened in wordpad) These files seem to create the individual coding for the menu layout and are referenced by the .rml file
.RML - files (can be opened in wordpad) These files point to the RCSS file and also contain the health % of the unit and the .dds graphics that are used as well
.DDS - files (can by opened with photoshop with correct plugins only) Can also download a trial version of mysticthumbs342 to see the .dds files in a preview window without opening every file. The DDS texture is used by both the RML and RCSS files to create the HUD display found in the games menu functions and windows.
The coding is a little odd and more like what you would see in a website or c++. I can only see 1 occurrence of the vehicle and I'm assuming that the coding allows any vehicle to be swapped into the spot in the coding. I will have to post the files later. Here is the directory that everything can be found it. If anyone wants to have a crack at this.
C:\Program Files (x86)\Steam\SteamApps\common\Emergency 5\data\em5\local\gui\asset\avatars ------all the avatars of larger grpahics in the lower right side of the screen
C:\Program Files (x86)\Steam\SteamApps\common\Emergency 5\data\em5\local\gui\asset ---- all the RCSS files and more .dds files used to make up the different windows
C:\Program Files (x86)\Steam\SteamApps\common\Emergency 5\data\em5\local\gui\asset\unit_selection ---- contains the .dds textures used for the shield, ammo, and fire damage to a a vehicle or asset.
Anyone knows and EASY way to actually look at or modify a RCSS file or RML files please let me know.
Thanks and have a good day
William516
Bill
Delaware,USA
#6
Posted 17 September 2015 - 10:47 PM
got the suv to show up in the game but once you call it, it doesnt leave the station and just disappears... something must be missing from the files outside of what you have said... hmmm
how do you change the uservehicle? is it in the editor.
im guessing that is the problem..... and the command arraY
#7
Posted 18 September 2015 - 12:31 AM
The user interface system is based on "libRocket". It's a C++ interface middleware package based on HTML and CSS specifications. If you can programm websites, you can also change the user interface of EMERGENCY 5. I think it's easier to change the code manually by editing the files with text editors. But you also can try "Rockete".
#8
Posted 18 September 2015 - 12:35 AM
I will have to email you the file for the prefab.
If you took a car from the civil vehicle loby you need to change it to a type 0 user vehicle.
Then you have to add the command array and also delete the em5 despawn from the vehicle.
I will send you the json file to look at and check against yours
William516
Bill
Delaware, USA
#9
Posted 18 September 2015 - 12:58 AM
alrighty ill be waiting for the email... Thanks
#10
Posted 18 September 2015 - 02:05 PM
Ok so here we go so far. After a battle last night with this game of searching through file after file after file of .dds textures and everything else. I have a HUGE breakthrough for myself and a personal accomplishment. (I know others have done far more and better but hey I'm happy to finally understand some stuff) The other good thing is that I believe I can put together a tutorial that can explain this process to everyone that wants to get a vehicle into the game.
I have managed to get my graphic into the status window and also the unit selection window. No more HUGE missing red box anymore. Starting to look more like the game. Also I have managed to keep all the original vehicles intact. The system now shows the proper seating and space available. The problem is the unit "armor", "ammo" and "fire" icons all show 0%. I'm not sure where this is controlled. I checked the whole prefab file for existing vehicles and cant determine where this status comes from. Have yet to test the health of the vehicle either as of now.
Other problems are that despite showing color in Photoshop when the image is shown in game it appears to be mostly greyscale and looks like crap. I am using the .dds plugin for the Photoshop program. When I go to save as a .dds file it then gives me an nvidea window that shows tons of methods to save too. I have no clue what the right option is. Also I can't seem to see the properties of the original .dds texture files to figure out what it should be.
Anyone that has a good idea on how to skin should be able to get that and hopefully explain it to me.
Well here is the progress
Status window now shows the corrected unit, "ID_NAME_SUV" is linked to the unit order info file. I will see if i change it there what happens. Seating shows corrected seating. (test purposes for now) Unit command array shows up, not completed as more commands and equipment must be added. (simply a test right now to learn how it all comes together) See the status all set at 0% and unsure what controls this right now.
Unit order window now shows correct graphic, but the unit selection window is still not working per department, Another hidden thing to find.
Calling all cars, calling all cars LOL
A quick test to see if the numbers in unit selection "REALLY" work and they do
a quick test to check other vehicles from the police force and ensure no vehicles had problems. So far so good
Moving along to other things later today.
(Walker sorry i have yet to have a chance to look at and email the prefab for you as of right now, the best thing i could recommend right now is to look into the prefab in the EM5 world editor. Take your new civilian unit and open up the police vehicle. Place them both into the editor at the same top and look at the difference between the two. I know that you MUST change a property so the vehicle can be USER controlled. I know that setting is "0"
I also know you have to add the component "Em5 commendable" then you have to add the command array from the police vehicle. I have never had luck copying from one vehicle to another in the EM5 world editor. So for the array you may have to do that in Wordpad. Hopefully this can hold you over until I can get the prefab to you)
William516
Bill
Delaware,USA
#11
Posted 18 September 2015 - 03:50 PM
ya i did place them next to each other last night and got the command added to the suv. Still having trouble finding this user vehicle setting.... can't find it in the json file of the civil_car06 or anything .... still digging... will be waiting to hear from you as there isnt much i can do without figuring that out haha. Nice progress though. Some nice work for sure
#12
Posted 18 September 2015 - 10:06 PM
Walker
I just checked it is actually under "AI Navigation" "Mover Type" Change this to 0 "Player vehicle"
That should make the vehicle playable as a unit.
Open up your EM5 world editor and it should be in the properties of whatever vehicle you are using. If not let me know.
William516
Bill
Delaware,USA
#13
Posted 18 September 2015 - 10:13 PM
Ok more updates on the progress.
I have now figured out where all the graphics are coming from. Still no luck on the % stats yet. I have also figured out the name of the unit so I don't have to look at the silly ID thing.
Unit name and icon now show up in the Select vehicle slot correctly.
Custom made help file now as well. The only problem is once again somewhere there is text for the help file that I cant find. Another search to find that as well. This is a nice little thing as we will be able to tell about the features of the car in game and how to use them when/if anyone gets that far.
Moving right along with what little time I get to play with things.
William516
Bill
Delaware,USA
#14
Posted 18 September 2015 - 11:26 PM
#15
Posted 19 September 2015 - 12:36 AM
Are you getting any errors in your debug lines. If so wjat are they. All else fails reboot the computer.
I have had it happen after the new patch sometimes.
William516
Bill
Delaware, USA
#16
Posted 19 September 2015 - 12:43 AM
#17
Posted 19 September 2015 - 02:02 AM
I'm working on multiple things at the same time so soon you should see another post. I know Frozenone said he figured it out but i think i did too now. Not like I'm copying off him or anything. I was trying to figure this trick out for awhile and after looking at tons of .json files i think i finally found the one i was looking for. Stay tuned lol
William516
Bill
Delaware,USA
#18
Posted 19 September 2015 - 02:25 PM
got the vehicle to move out of HQ finally and it didn't disappear. Thanks William haha
Edited by Walker282, 19 September 2015 - 02:36 PM.
Posts merged. Please use the edit button in future.
#19
Posted 19 September 2015 - 03:07 PM
Will:
Have you gotten the amour resistances to change from zero yet? If not the values are in the EM5 Road Vehicle drop down box in Object Properties in the editor. It is under Resistances. The values are 0.000000 and 0.800000 or whatever you want the car to be
#20
Posted 19 September 2015 - 03:12 PM
Seriously? I literally just merged your previous two posts... Don't double post, use the edit button. That is what it's for.
Executive Director: Forum Child Watch
Think a lot. Say little. Write nothing.
-J.P. Morgan