Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative Paths for Custom.dat #18

Closed
OrionSR opened this issue Feb 9, 2020 · 4 comments
Closed

Relative Paths for Custom.dat #18

OrionSR opened this issue Feb 9, 2020 · 4 comments

Comments

@OrionSR
Copy link

OrionSR commented Feb 9, 2020

The goal is to allow Custom.dat to use standard IDE lines without modification regardless of the location of Custom.dat or whatever Sanny considers to be the current directory.

Example:

PATH @SB:\data\Resources\data\gta_sa\sa_arm\

IDE DATA\DEFAULT.IDE
IDE DATA\VEHICLES.IDE
IDE DATA\PEDS.IDE
@OrionSR
Copy link
Author

OrionSR commented Feb 9, 2020

Maybe add DAT entries to Custom.dat and use the standard dat files directly.

PATH @SB:\data\Resources\data\gta_sa\sa_arm\

DAT DATA\DEFAULT.DAT
DAT DATA\GTA3.DAT

@OrionSR
Copy link
Author

OrionSR commented Feb 10, 2020

One objective of gaining more control of the paths is to allow the user to create, test, and use edit mode folders created in, for example, SA User Files under the Documents folder, that reference IDE resources in a Sanny folder.. And, once everything is working, the edit mode could be moved to a Sanny folder without needing to modify the paths in the DAT files.

Similarly, it shouldn't matter if the edit mode folder is off of Sanny's data folder or a sub-folder of data.

@x87
Copy link
Collaborator

x87 commented Aug 12, 2020

Yes, I encountered this issue with the difference between game DAT and custom.dat paths. Game DAT seem to be referencing IDE files from the exe directory while Sanny does that from the custom.dat directory.

What exactly "PATH" does in your example? Is this a root directory to append to IDE paths? E.g.:

PATH @SB:\data\Resources\data\gta_sa\sa_arm\

IDE DATA\DEFAULT.IDE
IDE DATA\VEHICLES.IDE
IDE DATA\PEDS.IDE

makes Sanny open

@SB:\data\Resources\data\gta_sa\sa_arm\DATA\DEFAULT.IDE
@SB:\data\Resources\data\gta_sa\sa_arm\DATA\VEHICLES.IDE
@SB:\data\Resources\data\gta_sa\sa_arm\DATA\PEDS.IDE

Correct?

@x87
Copy link
Collaborator

x87 commented Aug 13, 2020

Now there is base attribute to specify a directory to prepend IDE paths in DAT files with. I.E. for San Andreas:

        <ide base="@game:\">@game:\data\default.dat</ide>
        <ide>@game:\data\maps\veh_mods\veh_mods.ide</ide>

assuming @game: evaluates to C:\Games\SA Sanny would load C:\Games\SA\data\default.dat and prepend each IDE entry in it with C:\Games\SA\:

C:\Games\SA\DATA\DEFAULT.IDE
C:\Games\SA\DATA\VEHICLES.IDE
C:\Games\SA\DATA\PEDS.IDE

For all other cases when base is not defined all paths are relative to the directory where the DAT is located.

@x87 x87 closed this as completed Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants