OSP Code QoL Dice game

Users who are viewing this thread

This mod adds a simple dice game.
The object of the game is to get the higher values of dice rolls than your opponent.



Download: http://www.nexusmods.com/mbwarband/mods/6082/?

Installation:
Fully compatable with 3 cards game, just overwhrite textures and brf.
Module System is required.
- copy the *.dds into your module's\Textures folder
- copy the *.brf into your module's\Resource folder
- copy the *.wav into your module's\Sounds folder
- edit your module.ini add load_mod_resource = mmc_3cards
- modify your module system.
-- copy code from module_scripts.txt to module_scripts.py before last ].
-- copy code from module_meshes.txt to module_meshes.py before last ].
-- copy code from module_presentations.txt to module_presentations.py before last ](but, in fact no matter) .
-- copy code from module_dialogs.txt to module_dialogs.py. Lines must be added before line:
  [anyone|plyr,"tavernkeeper_talk", [], "I guess I should leave now.", "close_window",[]],
-- copy code from module_sounds.txt to module_sounds.py before last ].
The key word is ### Dice game ### and ### Dice game ### END ###

Credit: AndyYa


 
Smooth, good and simple :wink: I was expecting some more The Witcher like dice game but that's enough for me :grin:


PS

You forgot to change one dialog name from three cards game to dice game:

[anyone,"tavern_tk_dgame",
  [
    (store_troop_gold,reg1,"trp_player"),#
    (ge,reg1,1),#
      ],
  "Ok.", "close_window",
  [(assign, reg50, 0),
    (assign,"$g_gamble",0),
    (start_presentation, "prsnt_dices_game"),]],

  [anyone,"tavern_tk_3cards",[],
  "You don't have enough money.", "close_window",[]], 

Tavern_tk3cards should be renamed to tavern_tk_dgame.
 
AndyYa said:
tnx all,
rolling sounds and dialogs needs to fix.
blackjack is already done by oolonglgx.
all his links are broken :sad:

btw my module system sais that there is an try end missing in the second block of module_presentations
adding a (try_end), did the job
 
Hi all I know this is a old thread but I have these errors when compiling
Initializing...
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting info_page data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
WARNING: Global variable never used: g_presentation_obj_9
WARNING: Global variable never used: g_presentation_obj_11
WARNING: Global variable never used: g_presentation_obj_16
WARNING: Global variable never used: g_presentation_obj_17
Exporting postfx_params...

______________________________

Grabbing item names and values from ID_items.py
2268 items found
Grabbing item values from module_troops.py
2021 items used by troops
247 unused item names saved to unused_items.txt
Finished
Script processing has ended.
Press any key to exit. . .
Everything is entered as described so don't know what is wrong
 
I'm getting this
Loading module... FAILED.
MODULE `presentations` ERROR:
Traceback (most recent call last):
  File "compile.py", line 127, in <module>
    from module_presentations import *
  File "C:\Users\home\Desktop\═ютр  яряър\module_presentations.py", line 18898
    ("dices_game", 0, 0, #dices game reg0
    ^
IndentationError: unexpected indent
What seems to be the problem? I tried comparing it with other similar entries, and didn't manage to find the error. :???:
 
markfamily said:
Hi all I know this is a old thread but I have these errors when compiling
Initializing...
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting info_page data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
WARNING: Global variable never used: g_presentation_obj_9
WARNING: Global variable never used: g_presentation_obj_11
WARNING: Global variable never used: g_presentation_obj_16
WARNING: Global variable never used: g_presentation_obj_17
Exporting postfx_params...

______________________________

Grabbing item names and values from ID_items.py
2268 items found
Grabbing item values from module_troops.py
2021 items used by troops
247 unused item names saved to unused_items.txt
Finished
Script processing has ended.
Press any key to exit. . .
Everything is entered as described so don't know what is wrong

Warnings aren't really the same as an error,  they just warn you about something that the compiler doesn't like. Like the above, you declared the variables, but no script or code points to them. You can feel free to ignore it.



Corbul said:
I'm getting this
Loading module... FAILED.
MODULE `presentations` ERROR:
Traceback (most recent call last):
  File "compile.py", line 127, in <module>
    from module_presentations import *
  File "C:\Users\home\Desktop\═ютр  яряър\module_presentations.py", line 18898
    ("dices_game", 0, 0, #dices game reg0
    ^
IndentationError: unexpected indent
What seems to be the problem? I tried comparing it with other similar entries, and didn't manage to find the error. :???:

And this is how the compiler spits out missing commas. Look at the line just above this one and you're probably missing a comma.
 
Back
Top Bottom