Jump to content

Mission Coding


Craig Kostelecky

Recommended Posts

spaceeinstein

The paths are stored starting at 0x9B6E5C. I noticed that changes to the last three values using VC's format cause changes to the stored paths but not III's format. VC's format uses the function at 0x435C30 and III's format uses the function at 0x4364F0.

  • +10 - byte - flag
  • +11 - byte - speed limit
  • +12 - byte - spawn rate
  • Like 1
Link to comment
Share on other sites

Good catch! That could probs be considered a bug.

Link to comment
Share on other sites

Spawn rate seems used, but flags and speed limit indeed seems to be ignored. I wonder if it's a bug or intentional...

Link to comment
Share on other sites

What are the benefits of using III paths system instead of VC?

Link to comment
Share on other sites

1:1 paths, without having to convert them between IDE (object based) and IPL (detached) paths.

 

 

EDIT:

Yep it works now, but using LCS paths there is NO roadblocks, at least in Portland.

Edited by Silent
Link to comment
Share on other sites

spaceeinstein

I've spent a long time trying to figure out III's roadblock system but I couldn't get it to behave as expected. Here's what I got so far:

  • The game iterates through all IPL entries that are treadables.
  • The object's path group must contain two external nodes and one internal node.
  • The object's path group must either contain four or greater number of total lanes on the external nodes, whichever is greater, or the treadable's index bitwise AND 7 is equal to 4.
  • The treadable's index is added to an array which helps determine where to spawn the roadblocks.
  • In III 0x92A5BC and in VC 0x7DDEF0 contains an array of path indexes for roadblocks to spawn.
Edited by spaceeinstein
  • Like 2
Link to comment
Share on other sites

Okay, so I have changed my VC's pink marker's color to yellow by using Hackman128's eASIer with these memory addresses:

 

0x0068F958 255
0x0068F959 255
0x0068F95A 128
0x00689CA8 255
0x00689CA9 255
0x00689CAA 128

 

But the yellow marker still shows up as a pink blip on the radar, and the yellow marker flickers pink sometimes. Can someone please tell me which memory address changes the pink blip's color?

 

EDIT: Will this mod feature snow?

Edited by EddoWilliams2016
Link to comment
Share on other sites

spaceeinstein

This is not the correct place to ask general coding questions. Ask your questions here. This mod is not officially adding snow. You can add snow yourself; VC:Weather is included in the mod already. Remember, this is Vice City mod. Most mods that work in Vice City already work in GTA: Liberty City.

  • Like 1
Link to comment
Share on other sites

spaceeinstein

Paths and SilentPatch update (last updated 2016-09-07)

Important! Delete vcopcode.asi and IIItoVC.asi if they exist!

Changes:

  • IDE paths from III mostly work. The treadables limit has been increased to 8000. All the idiosyncrasies from using IPL paths also appear with IDE paths, e.g. Callahan Bridge westbound cars going over median despite path being straight, cars stopping at the traffic light outside the Staunton safehouse, etc. Roadblocks haven't been implemented yet (I still couldn't figure this out).
  • Implemented some SilentPatch improvements:
    • Proper text shadows.
    • Ground fires create light on ground.
    • Wet roads reflection fix.
    • Free resprays reset when starting a new game.
    • Firetruck and Ambulance creation time reset when reloading game.
    • Fixed police scanner calling zone name instead of number.
    • Melee weapons obtained through Vice City's cheats no longer replaced by other melee weapons without input.
    • Game will not ask for CD if game is in A or B drives.
    • Disabled video memory check.
    • Disabled DirectPlay dependency.
    • Mouse sensitivity on vertical axis matches horizontal axis.
  • Better code for looping audio with random play times thanks to ModelingMan.
  • Platinum pickups' random spawns should match III now. It feels less random than what I did before but that's how III spawns them.
  • Window name properly changed to "GTA: Liberty City". gta-lc.asi sometimes causes other windows to be renamed so this needs to be fixed in the future.
  • Fixed forbidden path coordinates after "A Drop In The Ocean".
  • Debug mode: Forbidden paths are correctly created (noticeable at Phil's place).
  • Source code: Opcodes 018B and 022B renamed to their proper names.
Edited by spaceeinstein
Link to comment
Share on other sites

Since you'll probably have less trouble integrating IDE path fixes to the codebase than me, just grab those functions I reversed (and fixed so they register previously unused flags):

 

http://pastebin.com/ZrNaiPUq

 

Hopefully it's somewhat useful ;) Do you have any clue on what flag 2 in CPathInfoForObject is? It's hardcoded to be always 0 in the code so I couldn't name it.

Link to comment
Share on other sites

spaceeinstein

Thanks so much for this, Silent. Your code is working well in the game. How did you find the names to the functions? I don't know what the unknown flag is. Could it be a leftover from III?

Edited by spaceeinstein
  • Like 2
Link to comment
Share on other sites

How did you find the names to the functions?

They are all from the mobile version!

Link to comment
Share on other sites

spaceeinstein

>_> I can't believe I made this hard on myself for so long. I've always been referencing functions from the PS2 version of III.

Edited by spaceeinstein
Link to comment
Share on other sites

lol yeah... III, VC, SA and LCS symbols (together with unused functions so some of the III stuff is actually left VC-iseed) are all known since their mobile released. You definitely went the very hard way :D

Link to comment
Share on other sites

Craig Kostelecky

I can picture the happy dance space is doing right now.

Link to comment
Share on other sites

spaceeinstein

I'm ecstatic. I'm spending a ton of time reorganizing the code and renaming things. I wish I could have more time in my life to document all of this at GTAModding.

Edited by spaceeinstein
  • Like 4
Link to comment
Share on other sites

I would like to make a "little" contribution:

 

Here are some memory addresses that I'm sure would be of some help:

 

#vehicles not floating above ground
0x00428EC0 0
0x00428EAE NOP 2

#ignore "player.bmp" bitmap
0x00627EE2 0xE9,0xA5,0x00
0x00627EE7 NOP

Link to comment
Share on other sites

Craig Kostelecky

I know that feeling well space. It's the same way I felt when I discovered the scm files from the mobile version and rewrote everything with R*'s variables and label names (as well as going to the high level Sanny code)

Link to comment
Share on other sites

I have something exciting for you.

 

Lift bridge update (last updated 2016-09-12)

Important! Delete vcopcode.asi and IIItoVC.asi if they exist!

Changes:

  • The lift bridge has been recreated! Download the latest SFX update to properly hear the sound. I used a workaround to get the cars to stop at the bridge because dealing with paths is a pain.
  • IDE paths support VC's flags thanks to Silent.
  • Island completion stored in save file (mainly affects scrollbar messages).
  • Fixed rare crash involving peds investigating missing dead peds.
  • Windows mouse cursor no longer goes off screen during gameplay (SilentPatch feature).
  • Dash light for FBI Rancher (forgot to include this to prior change log).
  • Spray shops accept the same vehicles as III.
I made wide changes to the code so there might be something I missed. Edited by spaceeinstein
  • Like 5
Link to comment
Share on other sites

@spaceeinstein: Have a :cookie:!

 

@Craig: Here are some suggestions for your mod:

 

Bike race missions.

Use my Sprinting With Two-Handed Weapons mod in your mod, so that way. LCS fans will be pleased.

Ability to refill health by buying food from various places around LC like in original VC.

Hitmen constantly coming after Claude and attacking him after "Sayonara Salvatore", and after "The Exchange". The hit is called off.

Payphone assassination missions like in VC.

Ability to change outfits.

Link to comment
Share on other sites

@spaceeinstein: Have a :cookie:!

 

@Craig: Here are some suggestions for your mod:

 

Bike race missions.

Use my Sprinting With Two-Handed Weapons mod in your mod, so that way. LCS fans will be pleased.

Ability to refill health by buying food from various places around LC like in original VC.

Hitmen constantly coming after Claude and attacking him after "Sayonara Salvatore", and after "The Exchange". The hit is called off.

Payphone assassination missions like in VC.

Ability to change outfits.

i don't think thats a good idea...

1 sprinting with two-handed weapons its a lcs stuff not gta 3 (this mod is about make from vc gta 3)

2 again its a gta 3 mod...

3 that would be stupid..

4 from where you will get sound for the missions? and .... its a gta 3 mod....

5 no

in my opinion your ideas are not good... they ruin gta 3 feeling...

6 But let the Craig Kostelecky decide...

Edited by NOskillx
Link to comment
Share on other sites

Craig Kostelecky

let the Craig Kostelecky decide...

 

That may have been the first time I've been referred to as the Craig Kostelecky.

 

This isn't my game, I've just been the guy who's been the "leader" for the majority of its time. And lately I've just been watching and testing the amazing updates that space has done. And on that subject, great job on the bridge space. I've only looked at the video so far, but it looks great. I look forward to testing it in game when time permits.

Link to comment
Share on other sites

Miscellaneous update (last updated 2016-09-18)

Important! Delete vcopcode.asi and IIItoVC.asi if they exist!

Changes:

  • A feature that GTA III doesn't have: the lift bridge's LOD models move up and down. I don't know why R* didn't do this.
  • Fixed donkey magazines/bullion pickup corona becoming invisible at night (my mistake when I first implemented them).
  • You can customize the donkey magazine locations and the models for both the donkey magazines and bullion pickups through the optional pacman.dat file. Create the file in the main game directory.
    • Line 1: Bullion model
    • Line 2: Donkey magazine model
    • Subsequent lines: XYZ coordinates
    For example:

     

    13681325913.6222 -155.13692 4.969947913.924 -124.129425 4.969257913.279 -93.52423 7.432599
    This is only for unofficial use. Without this file, the game uses the default hardcoded values. I added this because I like customization.
  • The stats for "stores knocked off", "assassinations contracts completed", and "fire truck mission level" will not be displayed in the stats menu unless their stored value is greater than 0.
  • Added "missions passed" line into the stats menu. Surprisingly Vice City doesn't use or save this stat so I had to take over the "visits from loan sharks" stat and use that to store the number of missions passed.

    stats_th.jpg

@EddoWilliams2016, you should look at the source code here and here. They're all documented and labeled. Edited by spaceeinstein
  • Like 3
Link to comment
Share on other sites

Nice update anyway maybe you can make gta 3 helicopter sound in the next update ? just a suggestion

Edited by NOskillx
Link to comment
Share on other sites

I know, but I like VC's sounds.

Link to comment
Share on other sites

Craig Kostelecky

VERY nice update. I too like having the option of customization :)

  • Like 1
Link to comment
Share on other sites

If you mean to make it easy to customize through plain text files, that is outside the scope of my goal for this project. It would essentially be a mod general to Vice City not specific to Liberty City. If you know C++ and maybe assembly, it is already fully customizable.

Edited by spaceeinstein
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.