Description
The shopping.dat file is a data text file. The file is found in the data folder; San Andreas/data/shopping.dat
To mark a comment in the file, put # before, what your going to write. The file and be opened/edited with any text editor.
The file holds has every object's price in it. The file is broken into sections by type of object.
Editing
The file isn't so hard actually, and can be edited, quite easily, it goes like this:
For CarMods:
- Code:
#name, nametag, stats to change, price
# # # # #
Clothes, haircuts:
- Code:
#texturename, nametag, modelname, type, stats to change, price
# # # # # # #
Tattoo's:
- Code:
#texturename, nametag, type1, type2, stats to change, price
# # # # # # #
Food:
- Code:
#name, nametag, stats to change, price
# # # # #
Weapons:
- Code:
weapontype, nametag, ammo, stats to change, price
# # # # # #
# meaning the value of the name, nametag, stat, or price.
The first "stat to change" is the respect level increase of the item, the second it how much sexy-ness it adds to the player
Example:
- Code:
#texturename, nametag, modelname, type, stats to change, price
watchcro WATCH1 watch 14 respect 3 sexy 3 8000
The file is split in selections, weapons, clothes, carmods, food, tattoo's...
Each selection starts like this:
- Code:
section #
And ends with:
- Code:
end
The following selections are unused:
- Code:
section Furniture
end
section Gifts
end
section Property
end
SCM
The following opcodes are are related to this file:
- Code:
075D: load_shopping_data_SHOPS_subsection "CLOTHES" // v$
075E: load_shopping_data_PRICES_subsection 0@s // v$
075F: store_shopping_data_entries_number_to 2@
0760: store_shopping_data_index 3@ textureCRC_to 4@
0761: get_shopping_item_with_textureCRC 4@ price_to 5@
0783: get_shopping_item_with_textureCRC 4@ flag 0 store_to 5@
078C: get_shopping_item_with_textureCRC 4@ nametag_to 6@s // 8-byte string
0790: charge_money_for_shopping_item_with_textureCRC 4@
08C8: set_shopping_item_with_textureCRC 4@ price_to 0
08C9: reset_shopping_item 4@ price
087C: release_shopping_data
- Code:
075D: load_shopping_data_SHOPS_subsection "CLOTHES" // v$
The first opcode(above)loads the shopping data shop subsection, selection.
- Code:
075E: load_shopping_data_PRICES_subsection 0@s // v$
The second opcode loads the shopping data shop prices subsection, then stores to a local string variable.
- Code:
075F: store_shopping_data_entries_number_to 2@
The third opcode stores the shopping data entries number, to a local variable.
- Code:
0760: store_shopping_data_index 3@ textureCRC_to 4@
The fourth opcode stores the shopping data index to a variable, and the textureCRC to a another variable.
- Code:
0761: get_shopping_item_with_textureCRC 4@ price_to 5@
The firth opcode gets the shopping item with the textureCRC stores to a variable, and the price to another variable.
- Code:
0783: get_shopping_item_with_textureCRC 4@ flag 0 store_to 5@
The sixth opcode gets the shopping item with the textureCRC, stores to a variable, the second parameter is a flag, (it will usually be 0)
and the third parameter is a variable to store to.
- Code:
078C: get_shopping_item_with_textureCRC 4@ nametag_to 6@s // 8-byte string
The seventh opcode gets the shopping item with textureCRC and stores it to a varible. And then stores the nametag to
a local string variable (8-byte string).
- Code:
0790: charge_money_for_shopping_item_with_textureCRC 4@
The eight opcode charges money for the shopping item with the textureCRC's variable.
- Code:
08C8: set_shopping_item_with_textureCRC 4@ price_to 0
The ninth opcode sets the shopping item with the textureCRC's variable, and then sets the price of the item.
- Code:
08C9: reset_shopping_item 4@ price
The tenth opcode resets the shopping item, the only parameter is the item's variable.
- Code:
087C: release_shopping_data
The eleventh opcode releases the shopping data, from the games engine, and frees it.