OSP Code QoL Chosen Songs playing bards

Users who are viewing this thread

Cromcrom

Hello every body,
I don't know if this has been done before, if so, please excuse me.
vpbuk1.gif

I would like to freely share, no asking, just use it, this simplest bit of dialogs, that will allow your character to ask bards to play some songs. I think that's what the lazy dudes are supposed to do, beside teaching poems and chitchating about Calradian chicks.

First, make some custom bard song music (the red code below). I won't detail the add music stuff, but make sure you add the proper tavern flag. If not, It will conflict with the proper tavern music, and the bard songs will stop playing...

Copy/paste this at the very end of the music list, in module_music.py:

 
("jukebox_coronation", "coronation.ogg",mtf_start_immediately,mtf_sit_tavern,mtf_sit_travel,0),
  ("jukebox_wedding", "wedding.ogg",mtf_start_immediately,mtf_sit_tavern,mtf_sit_travel,0),
  ("jukebox_travel_neutral", "travel_neutral.ogg",mtf_start_immediately,mtf_sit_tavern,mtf_sit_travel,0),
  ("jukebox_tavern_1", "tavern_1.ogg",mtf_start_immediately,mtf_sit_tavern,mtf_sit_travel,0),
  ("jukebox_crazy_battle_music", "crazy_battle_music.ogg",mtf_start_immediately,mtf_sit_tavern,mtf_sit_travel,0),
  ("jukebox_escape", "escape.ogg",mtf_start_immediately,mtf_sit_tavern,mtf_sit_travel,0),
  ("jukebox_retreat", "retreat.ogg",mtf_start_immediately,mtf_sit_tavern,mtf_sit_travel,0),
  ("jukebox_outdoor_beautiful_land", "outdoor_beautiful_land.ogg", mtf_start_immediately,mtf_sit_tavern,mtf_sit_travel,0),



notice these flags, make sure to add them to new songs you would add: mtf_start_immediately,mtf_sit_tavern,mtf_sit_travel, is for Rigale, as there are some travelling bards that can be found in the wild.
Then, look for the blue code in the module_dialogs.py, and copy the red code just below the blue code, as it is there:

  [anyone|plyr, "minstrel_1", [(eq, "$minstrels_introduced", 1)  ], 
  "Can you teach me any poems?",
  "minstrel_courtship_poem", []],


[anyone|plyr,"minstrel_1",  #play Calradian tune"
  [

]," What Calradian tunes can you play ?","play_calradian_tunes",
[]
],
[anyone,"play_calradian_tunes", #play_tune"
  [
  ],"Here is the list of the songs I can play for 10 denars. ","play_calradian_tunes_final",
[]
],


Then look for the blue code below in module_dialogs.py, and copy paste the red code below it.

[anyone, "minstrel_pretalk", [], 
  "Is there anything else?",
  "minstrel_1", []],


[anyone,"play_calradian_tunes", #play_tune"
  [
  ],"Here is the list of the songs I can play for 10 denars. ","play_calradian_tunes_final",
[]
],

[anyone|plyr,"play_calradian_tunes_final", #play_tune"
  [
  (store_troop_gold,":available_gold","trp_player"),
  (lt,":available_gold",10),
  ]," I don't have enough money anyways. ","minstrel_1",
[ ]
], 

[anyone|plyr,"play_calradian_tunes_final", #play_tune"
  [ 
  ]," I changed my mind ","minstrel_1",
[  ]
],



[anyone|plyr,"play_calradian_tunes_final", #play_tune"
  [
  (store_troop_gold,":available_gold","trp_player"),
  (ge,":available_gold",10),
  ]," I can play 'The Wedding'. ","close_window",
[
(troop_remove_gold,"trp_player",10),
(play_track,"track_jukebox_wedding",2),               
]
],

[anyone|plyr,"play_calradian_tunes_final", #play_tune"
  [
  (store_troop_gold,":available_gold","trp_player"),
  (ge,":available_gold",10),
  ]," I can play 'The Coronation'. ","close_window",
[
(troop_remove_gold,"trp_player",10),
(play_track,"track_jukebox_coronation",2),               
]
],


[anyone|plyr,"play_calradian_tunes_final", #play_tune"
  [
  (store_troop_gold,":available_gold","trp_player"),
  (ge,":available_gold",10),
  ]," I can play 'The Travel'. ","close_window",
[
(troop_remove_gold,"trp_player",10),
(play_track,"track_jukebox_travel_neutral",2),               
]
],

[anyone|plyr,"play_calradian_tunes_final", #play_tune"
  [
  (store_troop_gold,":available_gold","trp_player"),
  (ge,":available_gold",10),
  ]," I can play 'The Tavern'. ","close_window",
[
(troop_remove_gold,"trp_player",10),
(play_track,"track_jukebox_tavern_1",2),               
]
],

[anyone|plyr,"play_calradian_tunes_final", #play_tune"
  [
  (store_troop_gold,":available_gold","trp_player"),
  (ge,":available_gold",10),
  ]," I can play 'Crazy battle music'. ","close_window",
[
(troop_remove_gold,"trp_player",10),
(play_track,"track_jukebox_crazy_battle_music",2),               
]
],

[anyone|plyr,"play_calradian_tunes_final", #play_tune"
  [

  (store_troop_gold,":available_gold","trp_player"),
  (ge,":available_gold",10),
  ]," I can play 'Beautifull Land'. ","close_window",
[  
(troop_remove_gold,"trp_player",10),
(play_track,"track_jukebox_outdoor_beautiful_land",2),               
]
],


[anyone|plyr,"play_calradian_tunes_final", #play_tune"
  [

  (store_troop_gold,":available_gold","trp_player"),
  (ge,":available_gold",10),
  ]," I can play 'The Retreat'. ","close_window",
[
(troop_remove_gold,"trp_player",10),
(play_track,"track_jukebox_retreat",2),               
]
], 


[anyone|plyr,"play_calradian_tunes_final", #play_tune"
  [

  (store_troop_gold,":available_gold","trp_player"),
  (ge,":available_gold",10),
  ]," I can play 'The Escape'. ","close_window",
[
(troop_remove_gold,"trp_player",10),
(play_track,"track_jukebox_escape",2),               
]
],


As it is here, changing the music will cost 10 denars.

And that's it. Very simple, it leave loads of rooms for tweaking and improvements.

Anyways, thanks for reading, have fun and take care, I hope to see you sometimes on Rigale.  :mrgreen:

PS: I would be honored to be added to the credits of your mod if you actually use this idea/code  :grin:
 
You are much welcome, I received so much help from great sharing people on this forum that it's the least I could do  :grin:
 
Thanks for sharing :wink:

(You might want to put the code in [ code] [ /code], color will be lost though )
 
Thanks for sharing.
I get a idea, Can the player learn song? I mean player can learn song and sing the song to lover~~
 
Well, thats a GREAT Idea :smile: It will make it to Rigale, thanks for sharing ^^

@Duh, yes, but copy/paste won't work for me in code brackets, hopefully, it works this way for others...
 
Tested this script on the version of 1152. Not workable, the music does not play  :neutral:
In the previous version worked well in 1143.
 
Back
Top Bottom