PyTFall > PyTFall: User Mods
idea of new quest/event/activity
nemojason:
hello i begin to write mine event :
init python
init python:
register_event("find_the_mine", locations=["hiddenvillage_entrance"], simple_conditions=["hero.luck >= 15"], priority=100, start_day=1, jump=True, dice=200, max_runs=1)
label Helena_meeting:
$ hm = Character("???", color=red, what_color=red, show_two_window=True)
stop world
hide screen hidden_entrance
with dissolve
show bg hiddenvillage_entrance:
size (config.screen_width, config.screen_height)
crop (0, 0, config.screen_width, config.screen_height)
easein 4.0 crop (100, 100, config.screen_width/4, 200)
if not "village" in ilists.world_music:
$ ilists.world_music["village"] = [track for track in os.listdir(content_path("sfx/music/world")) if track.startswith("village")]
if not global_flags.has_flag("keep_playing_music"):
play world choice(ilists.world_music["village"]) fadein .5
$ global_flags.del_flag("keep_playing_music")
image helena meet = "helena_meet.wepb"
image helena work = "helena_work.wepb"
image helena sex = "helena_sex.wepb"
label helena_meeting
show helena meet
with dissolve
$ h = hero.say
$ hm = npcs["Helena_Minecraft"].say
hm.say "Hello, what are you doing in this lost place?"
if char.charisma>50
label helena_working
show helena work
hm "Oh, not bad!..."
$ hm = npcs["Helena_Minecraft"].say
hm "I'm Helena who are you my cuttie?"
h "i'am" hero.name
else
jump helena_working
hm "oh, sorry i must finish my work, come back any time"
hide helena_working
show hiddenvillage_entrance
Is it correct?
for the green line i'm not sure, i want to give the name of hero, but not sure if it 'll work like that
nemojason:
and i write this for place a new actuvity in new location the mine :
label mc_action_mine_working:
if not has_items("Mine Scroll", [hero], equipped=True):
"You need the Mine Scroll before doing anything."
elif hero.AP <= 0:
"You don't have Action Points left. Try again tomorrow."
elif hero.vitality < 50:
"You are too tired for that."
elif hero.health < 10:
"You can't work to the mine, your health is too low"
else:
$ hero.AP -= 1
$ hero.vitality -= 50
$ hero.health -= 10
"You enter to the mine, and you start to work."
$ mine = (hero.constitution+hero.health) // 10 + randint(1, 3)
if dice(50):
$ hero.health += randint(-1, 3)
if dice(50):
$ hero.constitution += randint(1, 2)
$ hero.add_item("Bricks","Stone","Green Marble", mine)
$ gfx_overlay.random_find(items["Bricks","Stone","Green Marble","Amethyst","Topaz","Apatite","Sapphire","Emerald","Ruby","Diamond","Gold Ingots"], 'items', mine)
$ del mine
$ img_mine_work = ProportionalScale("content/gfx/interface/icons/Pick_Axe.png", 90, 90)
imagebutton:
pos(1120, 460)
idle (img_mine_work)
hover (im.MatrixColor(img_mine_work, im.matrix.brightness(.15)))
action [Hide("mine_entrance"), Jump("mc_action_mine_working"), With(dissolve)]
tooltip "Mine Working"
Xela:
Should be
--- Code: ---h "I'm [hero.name]."
--- End code ---
.
https://www.renpy.org/doc/html/text.html#interpolating-data
nemojason:
hello, i continue my little event xd
hmm, i'm not sure for do a thing... well i want to buy just 1 item quest from Helena... and after when i get this item, a new location 'll appear on the world map.
how can i do?
this is where i am :
init python:
register_event("find_the_mine", locations=["hiddenvillage_entrance"], simple_conditions=["hero.luck >= 15"], priority=100, start_day=1, jump=True, dice=200, max_runs=1)
label Helena_meeting:
$ hm=Character(" ??? ",color=red,what_color=red,show_two_window=True)
stop world
hide screen hidden_entrance
with dissolve
show bg hiddenvillage_entrance:
size(config.screen_width, config.screen_height)
crop(0,0,config.screen_width,config.screen_height)
easein 4.0 crop (100,100,config.screen_width/4, 200)
if not "village" in ilists.world_music:
$ ilists.world_music["village"] = [track for track in os.listdir(content_path("sfx/music/world")) if track.startswith("village")]
if not global_flags.has_flag("keep_playing_music"):
play world choice(ilists.world_music["village"]) fadein .5
$ global_flags.del_flag("keep_playing_music")
image helena meet = "helena_meet.wepb"
image helena work = "helena_work.wepb"
image helena sex = "helena_sex.wepb"
label helena_meeting
show helena work
with dissolve
$ h = hero.say
$ hm = npcs["Helena_Minecraft"].say
hm.say "Hello, what are you doing in this lost place?"
if char.charisma>50
label helena_working
hide helena work
with dissolve
show helena meet
hm "Oh, not bad!..."
$ global_flags.set_flag("helena_meeting")
$ hm = npcs["Helena_Minecraft"].say
hm "I'm Helena who are you my cuttie?"
h "i'am" hero.name
h "I'm walking in the village and i saw this place"
h "Do you know about this place?"
hm "It was my father's mine."
hm "After his death, dad give me the scroll for i continue his work"
h "And are you alone for continue this business?"
hm "Yes, i am... During all this time, i work everyday at the memory of daddy.."
h "May be i can help you for you change of life and enjoy it?"
hm "I'm not sure... You see it's all that remains of my father's memory."
if hero.gold>= 10 000
h "I can buy your mine and you 'll continue to work here if you wish."
else
h "I come back later Helena, i'll find any soluce at your problem"
hm "I'm waiting you my swetty!"
hide helena meet with dissolve
$ global_flags.set_flag("keep_playing_music")
jump hiddenvillage_entrance
else
jump helena_working
hm "oh, sorry i must finish my work, come back any time"
hide helena_working
show hiddenvillage_entrance
For the red line, is it correct for ask if the hero have enough money for buy item?
I continue to read your link for learn more but in english it's not very easy for me xd, i find a translate of this site, but it's not complete...
Do you have a site for search error in the code, it's hard to see all error?
Is in the file : city_map.rpy that i can insert the new location which start hide (modify in maps.jason) ?
After i think that the new location show in the map when the hero get the quest item... but xwhat files must i write that?
Xela:
Looks ok.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version