Jump to content


Photo

Desperados modding research


  • Please log in to reply
43 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
  • 607 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   291 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   284 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
  • 507 posts
  • Location:Colombia
  • Projects:Destination Norway

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
  • 607 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   235 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
  • 607 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   246 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   276 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
  • 607 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
  • 507 posts
  • Location:Colombia
  • Projects:Destination Norway

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
  • 607 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
  • 133 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.

#34 herbert3000

herbert3000

    Guilty Until Proven Innocent

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

Posted 17 November 2020 - 09:41 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)

Added the horse id and drunk level. Finally.

Thanks for figuring this out!

Attached File  DesperadosMissionScript_v0.4.zip   3.89MB   170 downloads



#35 herbert3000

herbert3000

    Guilty Until Proven Innocent

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

Posted 19 December 2020 - 12:22 PM

https://discord.com/...682654555471873



#36 Nosebeggar

Nosebeggar
  • New Members
  • 1 posts

Posted 05 September 2022 - 05:45 AM

Sorry for necroing this thread, but was there ever any further research done? Was the discord link an invite to a server that further discussed this? I'm very interested in any progress you guys made.

#37 Samz

Samz
  • Members
  • 57 posts

Posted 05 September 2022 - 08:26 PM

Sorry for necroing this thread, but was there ever any further research done? Was the discord link an invite to a server that further discussed this? I'm very interested in any progress you guys made.

I know the official Desperados Discord has a section for modding.



#38 herbert3000

herbert3000

    Guilty Until Proven Innocent

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

Posted 05 September 2022 - 10:20 PM

Sorry for necroing this thread, but was there ever any further research done? Was the discord link an invite to a server that further discussed this? I'm very interested in any progress you guys made.

Hi there!

You should definitely check out the Discord. A lot of progress has been made.

 

YetiWizard uploaded his tools here:

https://drive.google...yAb?usp=sharing

 

And here are two videos showing my work-in-progress mission editor:

https://www.youtube....h?v=f4BGajrByKc

https://www.youtube....h?v=EWOFy1QH_jY

 

 



#39 Glitch Master

Glitch Master
  • New Members
  • 4 posts

Posted 05 November 2022 - 03:21 AM

Hey guys, I hope all is well for you all. Here's the thing, for many years I've wanted to see a playable NPC's mod in Desperados. Though I have searched throughout the bowels of the internet to find any information or tutorials about how to do that, I haven't had any luck whatsoever. But I recently stumbled upon this thread and I will tell you this, Herbert here has shown me THE MOST best and comprehensive info about modding Desperados 1 that I've ever seen. This place is a treasure trove and a dream come true for me. People always told me that nobody could possibly mod this game due to there being no open source code but you guys have just proven them wrong. Now that I know that modding this game is possible, I'm quite happy with that. But however, one problem still remains for me. My only problem left is, although you've provided a ton of good useful information I am still not completely understanding it just yet due to all the confusing byte codes and stuff and also no info about how exactly to change the written scripts and add to changes to be able to play in the game. But anyway what I want you to do is tell me comprehensively how you could play as another character like for example: U.S. Marshal Jackson, Carlos, Dillon, or even that bounter hunter wearing grey from Demo mission that gets shot dead at the intro after pulling out 2 Colts at Dillon's bandits. I can't play Desperados for now and haven't played it in years because my laptop is screwed but while this thread is still alive, I'd like to hear a clear and thorough explanation on how to play as these characters because it's something I've always wanted to experience in my life when I get to play games again in the future. And additionally to that, do you know how to change the color of the dots on the ingame map? (I mean the little map that displays the status of the characters like: Green = Your playable characters, Blue = Civilians, Red = Enemies, Dark Red = Knocked out person, Brown = Dead) so you can change it to "Red = Your playable character" that would be awesome. And another very fun idea would be to make civilians killable without having the "Mission failed" screen come up, so then basically you'd have an awesome gameplay as if you are playing GTA 2 or something like that which sounds so fun don't you think? Also my Discord is Glitch Master#5514 so you can add me there if you wish but I won't be logging into Discord any time soon since both my phone and laptop have some bad issues which won't be resolved for quite a long time maybe. So yeah, I hope to hear back from you soon to give me a tutorial and hopefully we become good friends as well.

Edited by Glitch Master, 05 November 2022 - 03:44 AM.


#40 herbert3000

herbert3000

    Guilty Until Proven Innocent

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

Posted 13 November 2022 - 10:31 PM

Hi Glitch Master, glad you found us!

You should ask these questions on the Desperados Discord server, I think YetiWizard could answer your questions.

The only thing I managed to do is change the skin of one of your characters. I changed Sam's appearance and made him look like an enemy cowboy. But he still uses Sam's portrait and voice. And since the NPC doesn't have the animations for Sam's special weapons/items, those abilities can't be used.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users