Jump to content


Photo

Desperados modding research


  • Please log in to reply
32 replies to this topic

#21 Specop75

Specop75
  • Members
  • 10 posts
  • Location:Austria
  • Projects:Desperados & Helldorado

Posted 28 February 2017 - 05:16 PM

Allright, 0x21 makes sense for lvl 21 (the dead soldiers), but for lvl 16 I guess it's the gold bags that count as dead characters (01 01 08 00, ID is like that of an enemy).
As for 0x02, it makes the civs that have that use a different view cone "route" (slower and smaller).
 
So maybe Stance.2 = CHATTING? (since thats what they do on lvl4, dunno...), Stance.33 = DEAD
As for Neutrality, maybe:
0 = SUSPICIOUS
1 = NEUTRAL
2 = INSECURE
3 = AGRESSIVE?
 
Maybe map the actual char IDs as well? (Just extract them from Characters.dat)
11 = Pedro4
19 = Lino....
 
Not all sound effects are loaded into the level, only those specified in the FXBK (normally those that are used in the level, of course to save RAM). That means when you add a new enemy or something, his voice is not loaded automatically. I explained more about how to fix that in a pervious post. Anyways we would have to somehow link each character with his voice, gun sound effect... That way you could save a lot of time when adding new stuff to a level.
 
Btw. "s7" : 1 for accessories is the amount of that item, and not sure if you fixed that, but the program outputs "id" : "COOPER" for Mr Leone.


#22 herbert3000

herbert3000

    Guilty Until Proven Innocent

  • Division Admins
  • 480 posts
  • Location:Austria
  • Division:Commandos HQ
  • Job:Division Admin

Posted 28 February 2017 - 09:49 PM

Some children have the characterId 1 which isn't in Characters.dat, so I simply named it DEFAULT_CHILD.

Also some names are in French, e.g. Grosdebile, BigBill Peureux, TuniqueBleue. Do you think we should translate them to English?

 

The Cooper <> Mr. Leone bug should be fixed now.

 

Here's the updated tool: Attached File  DesperadosMissionScript_v0.3.zip   3.89MB   67 downloads

You can even drag & drop multiple files onto the window now.

 

I think you also don't have to look up each sound id in desperados.fxg, the value after fx_ is already the id, for example: fx_1088.wav, 1088d = 0x440

 

Another thing: I'm not sure about this but it looks like that the value after Accurary in this PDF file is the voice id and the column labeled W is the weapon sound id. Is that possible?

Attached File  Characters.dat.pdf   32.96KB   49 downloads

 



#23 Specop75

Specop75
  • Members
  • 10 posts
  • Location:Austria
  • Projects:Desperados & Helldorado

Posted 28 February 2017 - 10:43 PM

Thanks! I don't think it will be necessary to translate them since there is only a few of them.
And nice discovery, I didn't think of that. :D
 
Voice ID is definitely right but the W is the ID from the Weapons.dat. That also includes damage, ammo, range, but not the sound. The very last one (0 or 100) is if he is a camper. 100 yes, 0 no. And the first one is Health.
Btw. for the weapons:
v1 = ID (For the Characters.dat)
v2 = Name
v3 = Range
v4 = Strange, setting it to 0 does not seem to do much, but 150 gives you instant kills, yet the values at "Extra" also affect damage
v5 = Ammo
v6 = Shots fired (like the shotgun sends of 10 pellets)
v7 = Damage Area ( >0 allows friendly fire like Sanchez)
v8 = No idea, but has an interesting pattern...
The "Extra stuff" after Overheat and Recover might have something to do with damage and maybe more. (All 0 gives you only 1 damage like Mia)


#24 Salvadorc17

Salvadorc17

    title available

  • Members
  • 490 posts
  • Location:Colombia
  • Projects:https://github.com/salvadorc17/CommandosMaker

Posted 01 March 2017 - 07:30 PM

Epic progress over here, now im confused about how to use this mission script tool, should modifiy elements from dvd??



#25 Specop75

Specop75
  • Members
  • 10 posts
  • Location:Austria
  • Projects:Desperados & Helldorado

Posted 03 March 2017 - 03:54 PM

Yes, you modify the elements of a level (animated objects/characters/accessories...). Just follow the instructions and read the earlier posts to figure it out.
If you want to help, try to find out what all the unknown variables mean ( u1, u2, u3, u4...) or how the games handles height.
 
As for the animations:
    "u1" : 298, -> Height (unlike Y position, this influences whether an object will appear in front of it or behind it. (try it with the flag on lvl12)
    "u3" : 1, -> Visible? (1 yes, 0 no)
 
Enemies:
    "n2" : 0, -> This is a wierd one. It seems to determine how an enemy inside a building will react to gunfire. 0 makes him get out and run, 1 makes him get out and walk and 2/3 makes him get out and call for reinforcements. (Not sure what the difference between 2 and 3 is) (Only characters that spawn inside buildings have this >0)
 
And Accessories:
"s1" : 165, -> This ties a saddle to a horse, -1 means the saddle is not attached to any horse.
 
New missions can easily be added by cloning the 4 files of an existing one and then changing their names to Level_26.dvd/scb... (27, 28...).
After that add the new info into the ElDiablo.cpg file. (Between lvl 25 and Final)
 
[26. Escape from El Paso Custom]
cinematic = 10.bik
title     = Escape from El Paso Custom
level  = Level_26
map       = new mexico.map
Xposition = 315
Yposition = 415
 
Very usefull for testing.


#26 herbert3000

herbert3000

    Guilty Until Proven Innocent

  • Division Admins
  • 480 posts
  • Location:Austria
  • Division:Commandos HQ
  • Job:Division Admin

Posted 05 March 2017 - 12:33 AM

Accessory "b1" is always 0.
NPC "n1" is always 0.
Animation "u2", "u3", "u4" is either 0 or 1.
Item "u5" is either 0, 1 or 2.
NPC "n3" is 0 most of the times, sometimes it's 33 or 100.

Is it possible that Accessory "s1" is some kind of id?

 

This txt includes the histograms of all values:

Attached File  histograms.txt   3.33KB   51 downloads

(Alive = Player, NPC, Animal)


Edited by herbert3000, 06 March 2017 - 06:31 PM.
Made a mistake here: NPC "n2" is NOT always 0.


#27 Specop75

Specop75
  • Members
  • 10 posts
  • Location:Austria
  • Projects:Desperados & Helldorado

Posted 06 March 2017 - 04:55 PM

As I said before Accessory "s1" is the ID of the horse the saddle is attached to.
NPC "n3" is the NPC-s drunk state. 33 is slightly drunk whereas 100 is wasted (has headache and seems that if there is a "sleeping spot" marker on the map the NPC will go there to take a nap)

I tried it out and we can actually use the extracted map images from .dvm to find spawn positions for stuff (for lvl 4 and 12 just add 70 to x and y). Using extracted sprites from .dvf we can make a very nice map editor (just have to find how how this game handles height).



#28 herbert3000

herbert3000

    Guilty Until Proven Innocent

  • Division Admins
  • 480 posts
  • Location:Austria
  • Division:Commandos HQ
  • Job:Division Admin

Posted 07 March 2017 - 11:41 PM

If we want to figure out how the game handles height, this Excel spreadsheet might be useful.

It includes the x, y, u1, u2, u3, u4 values of all characters (grouped by mission) that are above ground level.

Attached File  Desperados_Height_Flags.zip   19.24KB   45 downloads

 

Update:

I found out that the values u1 and u2 are also used in the SGHT chunk of the dvd file.

Attached File  Level_04.dvd.sght.txt   82.27KB   41 downloads

For example:

# Object 327
0    1701.2197    501.11868    38.0    40.0
1    1768.8828    524.1192    38.0    40.0
2    1726.0073    565.61523    38.0    40.0
3    1658.3442    542.6147    38.0    40.0
1658.3442    38.0    501.11868    1768.8828    40.0    565.61523
EXTRA:    1    97
1    1    1    0
1.0    1.0
100    0

The EXTRA values match u1 and u2 from the ELEM chunk:

dvf    x    y    u1    u2    u3    u4
Sheriff    1611    426    1    97    23    0

Btw, those values are coordiantes on the map and define the gallows platform where the sheriff stands:
1701.2197    501.11868    38.0    40.0
1768.8828    524.1192    38.0    40.0
1726.0073    565.61523    38.0    40.0
1658.3442    542.6147    38.0    40.0

38 = min z, 40 = max z

 



#29 Specop75

Specop75
  • Members
  • 10 posts
  • Location:Austria
  • Projects:Desperados & Helldorado

Posted 10 March 2017 - 12:43 AM

Excellent work! After inspecting the BUIL section a little, I found out that the structure is quite simple. You have the general stuff like lock status, links to other doors... Then there is an array of edges that shape the door itself. Those can be easily modified with the .dvm extracted maps. They only consist of X & Y coords. After the shape comes another array with the navpoints that a character follows to enter/exit a building. Unlike the edges, navpoints also include the height -> they also correspond to the u1 & u2 values. u3 & u4 are still a mystery tho... Here is an example of a door edge marked red and navpoints marked green.

 

33yn7gx.jpg



#30 herbert3000

herbert3000

    Guilty Until Proven Innocent

  • Division Admins
  • 480 posts
  • Location:Austria
  • Division:Commandos HQ
  • Job:Division Admin

Posted 11 March 2017 - 06:46 PM

That's great!

And here's a visualization of the objects stored in the SGHT section:

Screenshot (153).png



#31 Salvadorc17

Salvadorc17

    title available

  • Members
  • 490 posts
  • Location:Colombia
  • Projects:https://github.com/salvadorc17/CommandosMaker

Posted 11 March 2017 - 07:37 PM

Just to ask what does the extra data in entities refers, stuff like God53ae3c8, Lopez53c4808, is refered to accessory??



#32 herbert3000

herbert3000

    Guilty Until Proven Innocent

  • Division Admins
  • 480 posts
  • Location:Austria
  • Division:Commandos HQ
  • Job:Division Admin

Posted 11 March 2017 - 09:50 PM

Just to ask what does the extra data in entities refers, stuff like God53ae3c8, Lopez53c4808, is refered to accessory??

It refers to a script in the .scb file



#33 Lexx2k

Lexx2k
  • Members
  • 128 posts
  • Location:Berlin
  • Projects:BTCOD Mission Pack

Posted 15 September 2017 - 12:27 PM

This looks great. Damn, I'd be totally up for making a small Desperados campaign.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users