Skip to content

Commit 05e0c3b

Browse files
Remove UI text and balance changes from CSLT
1 parent 612a2a5 commit 05e0c3b

File tree

1 file changed

+0
-138
lines changed

1 file changed

+0
-138
lines changed

_modpacks/resources/cslt/cslt.py

Lines changed: 0 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,5 @@
11
import pycsmm
22
import os
3-
import tempfile
4-
import sys
5-
6-
UI_MSGS_ALL = {
7-
4292: "Official Boards: Official boards which have been ported to Fortune Street",
8-
4293: "Custom Boards: Boards which were created by the Custom Street Modding Community",
9-
4294: "Official Boards",
10-
4295: "Custom Boards",
11-
4309: "Main Menu (Official Boards)",
12-
4311: "Main Menu (Custom Boards)",
13-
4316: "Tutorial: Learn the rules of the game whilst playing on a special practice board.",
14-
4317: "Tutorial: Learn the rules of the game whilst playing on a special practice board.",
15-
4319: "Start the tutorial?",
16-
4320: "Start the tutorial?",
17-
4381: "You've completed all available tours with the offical boards!",
18-
4382: "You've completed all available tours with the custom boards!",
19-
4446: "Tour Mode (Official Boards)",
20-
4447: "Tour Mode (Custom Boards)",
21-
4476: "Free Play (Official Boards)",
22-
4477: "Free Play (Custom Boards)",
23-
4812: "Official Boards",
24-
4813: "Custom Boards",
25-
4945: "Official Boards",
26-
4946: "Custom Boards",
27-
}
28-
29-
UI_MSGS = {
30-
"de": {
31-
2881: "Ladenwert steigt um <price_diff><g>!<n>Ladenpreise steigen um <fee_diff><g>!<n>Max. Kapital ist nun <zoushi_full><g>.",
32-
2885: "Ladenwert sinkt um <price_diff><g>.<n>Ladenpreise sinken um <fee_diff><g>.<n>Max. Kapital sinkt auf <zoushi_full><g>.",
33-
3295: "Dein Gesamtvermögen wird mit 5 % besteuert.",
34-
3305: "Du kaufst ein Geschenk für<n>60<g> x Stufe des Gastgebers = <bar><g>.",
35-
3370: "Wenn du vor dem Finanzamt<n>eines anderen Spielers Halt<n>machst, musst du eine<n>Vermögenssteuer von 5 %<n>bezahlen.",
36-
3572: "Der Preis glitscht an <en>! 100<g> x Stufe = <slgold><g> für den korrekten Wetteinsatz!",
37-
},
38-
"en": {
39-
2881: "<price_diff><g> rise in shop value!<n><fee_diff><g> rise in shop prices!<n>Max. capital becomes <zoushi_full><g>.",
40-
2885: "<price_diff><g> fall in shop value.<n><fee_diff><g> fall in shop prices.<n>Max. capital becomes <zoushi_full><g>.",
41-
3295: "You pay a 5% tax on your net worth.",
42-
3305: "You buy a gift to take with you for 60<g> x homeowner's level = <bar><g>.",
43-
3370: "If you don't own the tax office, when you land on it you have to pay a 5% tax on your net worth.",
44-
3572: "<en> takes away a prize of 100<g> x level = <slgold><g> for backing the winning boinger!",
45-
},
46-
"fr": {
47-
2881: "La valeur de la boutique grimpe de <price_diff><g> !<n>Les prix de la boutique grimpent de <fee_diff><g> !<n>Le capital max. est désormais de <zoushi_full><g>.",
48-
2885: "La valeur de la boutique chute de <price_diff><g>.<n>Les prix de la boutique chutent de <fee_diff><g>.<n>Le capital max. est désormais de <zoushi_full><g>.",
49-
3295: "Tu paies une taxe de 5% sur le total de tes biens.",
50-
3305: "Tu achètes un cadeau pour 60<g> x le niveau du propriétaire = <bar><g>.",
51-
3370: "Si l'hôtel des impôts ne t'appartient pas, tu dois payer un impôt de 5% du total de tes biens lorsque tu t'y arrêtes.",
52-
3572: "<en> remporte 100<g> x niveau = <slgold><g> pour avoir soutenu le gluant gluagnant !",
53-
},
54-
"it": {
55-
2881: "Il valore del negozio aumenta di <price_diff><g>!<n>I prezzi salgono di <fee_diff><g>!<n>Il limite d'investimento diventa <zoushi_full><g>.",
56-
2885: "Il valore del negozio si riduce di <price_diff><g>!<n>I prezzi nel negozio calano di <fee_diff><g>!<n>Il limite d'investimento diventa <zoushi_full><g>.",
57-
3295: "Paghi una tassa del 5% sul totale del tuo patrimonio.",
58-
3305: "Acquisti un regalo. Il prezzo è pari a 60<g> x il livello<n>del proprietario di casa = <bar><g>.",
59-
3370: "Se l'ufficio delle imposte<n>non è tuo, pagherai una tassa<n>pari al 5% del tuo patrimonio.",
60-
3572: "<en> ha indovinato chi<n>slimavrebbe vinto e intasca<n>100<g> x livello = <slgold><g>!",
61-
},
62-
"jp": {
63-
2881: "お店価格が <price_diff><g>アップ!<n>買い物料が <fee_diff><g>アップ!<n>増資あまりが <zoushi_full><g>になりました。",
64-
2885: "お店価格が <price_diff><g>ダウン・・・<n>買い物料が <fee_diff><g>ダウン・・・<n>増資あまりが <zoushi_full><g>になりました。",
65-
3295: "総資産の5%を払います。",
66-
3305: "おみやげ代として<n>持ち主のレベル×60<g><n>を払います。",
67-
3370: "持ち主以外が止まったとき<n>総資産の5%を払います。",
68-
3572: "<en>さんには<n>優勝賞金として<n>100<g>×レベル=<slgold><g>さしあげます!",
69-
},
70-
"su": {
71-
2881: "¡El valor del local aumenta en <price_diff><g>!<n>¡Los precios del local aumentan en <fee_diff><g>!<n>El capital máx. es ahora <zoushi_full><g>.",
72-
2885: "El valor del local cae en <price_diff><g>.<n>Los precios del local caen en <fee_diff><g>.<n>El capital máx. es ahora <zoushi_full><g>.",
73-
3295: "Pagas un impuesto del 5% de todos tus bienes.",
74-
3305: "Compras un regalo por 60<g> x nivel del propietario = <bar><g>.",
75-
3370: "Si la tesorería no es tuya,<n>tendrás que pagar un<n>impuesto del 5% de tus<n>bienes totales.",
76-
3572: "<en> se lleva un premio<n>de 100<g> x nivel = <slgold><g><n>por haber acertaglop el limo glapnador.",
77-
},
78-
"uk": {
79-
2881: "<price_diff><g> rise in shop value!<n><fee_diff><g> rise in shop prices!<n>Max. capital becomes <zoushi_full><g>.",
80-
2885: "<price_diff><g> fall in shop value.<n><fee_diff><g> fall in shop prices.<n>Max. capital becomes <zoushi_full><g>.",
81-
3295: "You pay a 5% tax on your net worth.",
82-
3305: "You buy a gift to take with you for 60<g> x homeowner's level = <bar><g>.",
83-
3370: "If you don't own the tax office, when you land on it you have to pay a 5% tax on your net worth.",
84-
3572: "<en> takes away a prize of 100<g> x level = <slgold><g> for backing the winning boinger!",
85-
}
86-
}
87-
88-
def replUiMessages(msgDict, toReplaceWith):
89-
for k,v in toReplaceWith.items():
90-
msgDict[k] = v
913

924
def replTitleImages(locale, arcDir, modpackDir):
935
gameSeqTitleAll = os.path.join(modpackDir, 'cslt/game_sequence_title_ALL.arc')
@@ -110,56 +22,6 @@ def __init__(self):
11022
pycsmm.UiMessageInterface.__init__(self)
11123
def modId(self):
11224
return "cslt"
113-
def saveFiles(self, root, gameInstance, modList):
114-
mapper = gameInstance.addressMapper()
115-
with open(os.path.join(root, 'sys/main.dol'), 'rb+') as mainDol:
116-
# patch home price / level
117-
homePriceVal = (60).to_bytes(2, 'big')
118-
mainDol.seek(mapper.boomToFileAddress(0x8008fade))
119-
mainDol.write(homePriceVal)
120-
mainDol.seek(mapper.boomToFileAddress(0x8010da32))
121-
mainDol.write(homePriceVal)
122-
# change slurpodrome prizes to match standard mode
123-
mainDol.seek(mapper.boomToFileAddress(0x8081b5a8))
124-
mainDol.write((100).to_bytes(4, 'big'))
125-
# and coins
126-
mainDol.seek(mapper.boomToFileAddress(0x8081b5a0))
127-
mainDol.write((20).to_bytes(4, 'big'))
128-
# change dart of gold prizes to match standard mode
129-
mainDol.seek(mapper.boomToFileAddress(0x8013cda4))
130-
mainDol.write(b'\x48\x00\x00\x0c')
131-
# increase AI memory lookahead
132-
memoryLookaheadPatch = b'\x3c\x80\x00\x02'
133-
mainDol.seek(mapper.boomToFileAddress(0x8009e6c4))
134-
mainDol.write(memoryLookaheadPatch)
135-
mainDol.seek(mapper.boomToFileAddress(0x8009d368))
136-
mainDol.write(memoryLookaheadPatch)
137-
# decrease tax office tax to 5%
138-
mainDol.seek(mapper.boomToFileAddress(0x8008fa34))
139-
mainDol.write(b'\x7C\x00\x1E\x70')
140-
# change 3 star shop value to 500
141-
threeStarVal = 500
142-
for boomAddr in (0x8008f18e, 0x800ead3a, 0x800fcae2, 0x8015cf36, 0x80160ee2):
143-
mainDol.seek(mapper.boomToFileAddress(boomAddr))
144-
mainDol.write(threeStarVal.to_bytes(2, 'big'))
145-
mainDol.seek(mapper.boomToFileAddress(0x80411bb4))
146-
mainDol.write(threeStarVal.to_bytes(4, 'big'))
147-
# and price
148-
mainDol.seek(mapper.boomToFileAddress(0x8008f192))
149-
mainDol.write((100).to_bytes(2, 'big'))
150-
# unlock all characters
151-
mainDol.seek(mapper.boomToFileAddress(0x80210a4c))
152-
mainDol.write(b'\x3C\x60\xFF\xFF\x60\x63\xFF\xFF\x3C\x80\xFF\xFF\x60\x84\xFF\xFF\x60\x00\x00\x00')
153-
# unlock all maps
154-
mainDol.seek(mapper.boomToFileAddress(0x8020f8d8))
155-
mainDol.write(b'\x38\x60\x00\x01')
156-
mainDol.seek(mapper.boomToFileAddress(0x8020f91c))
157-
mainDol.write(b'\x38\x60\x00\x01')
158-
159-
def saveUiMessages(self):
160-
return {f'files/localize/ui_message.{k}.csv':
161-
(lambda root, gameInstance, modList, msgDict, toReplaceWith=v: replUiMessages(msgDict, UI_MSGS_ALL | toReplaceWith))
162-
for k,v in UI_MSGS.items()}
16325

16426
def modifyArcFile(self):
16527
localeToTitleArcFile = {

0 commit comments

Comments
 (0)