Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
I have a text that says something like "Skill deals 5 damage." so the next thing I want it to show is IF damage goes up then show "Skill deals {color=ff0000}5{/color} damage"
Basically say same thing just change the color of number in sentence does anyone have idea how to make that work in my example here? Seems so trivial but for some reason I have problems making that work without making my code inefficient.
screen test:
for s in skill_list:
text "%s" % s.description
init python:
class Skill():
name = "Skill"
damage_base = 10
damage = damage_base
description = "[s.name] deals [s.damage] damage."
def skill_damage_up():
for s in skill_list:
s.damage += 1
skill_list = [Skill()]
label start:
show screen test
label loop:
"..."
$ skill_damage_up()
jump start
Last edited by Nero on Sat Mar 28, 2020 4:42 pm, edited 1 time in total.