Search found 242 matches

by Nero
Mon Mar 09, 2020 8:26 pm
Forum: Ren'Py Questions and Announcements
Topic: Making (Slay The Spire) Type Of Map
Replies: 7
Views: 494

Making (Slay The Spire) Type Of Map

Ok so I'm making a map with buttons that have few different paths player can chose more like replica of game "Slay the Spire". I haven't found thread about this kind of map design anywhere so I attempted doing it myself. I made it work with lists but the more paths I add the more difficult it become...
by Nero
Thu Feb 27, 2020 7:29 pm
Forum: Ren'Py Questions and Announcements
Topic: Printing Strings With %
Replies: 3
Views: 302

Re: Printing Strings With %

That's kind of sad that there is no way around it. Oh well I have to figure out some other way then thanks.
by Nero
Thu Feb 27, 2020 7:44 am
Forum: Ren'Py Questions and Announcements
Topic: Printing Strings With %
Replies: 3
Views: 302

Printing Strings With %

I was wondering if there is easier way of doing conditional operations like this. This works perfectly fine but can I like group certain set of strings that can be used if conditions are met? idle LiveComposite( (120, 170), # x y pos (0.095, 0.650), Text("%s%s%s%s%s%s" % ("Deal" if c.dmg > 0 else ""...
by Nero
Fri Feb 07, 2020 9:17 pm
Forum: Ren'Py Questions and Announcements
Topic: How To Return Elements In List That Can Be Used Later?
Replies: 1
Views: 423

How To Return Elements In List That Can Be Used Later?

So my main question comes in this line: textbutton "Attack Enemy" action Return("How do i make this return the zombie or goblin based on mouse click so I can follow it down with - damage taken code?") When I press on enemy that is in the list I want name of enemy to be memorized so I can follow up b...
by Nero
Mon Jan 14, 2019 6:29 pm
Forum: Ren'Py Questions and Announcements
Topic: While Loop Causing Game To Freeze
Replies: 4
Views: 417

Re: While Loop Causing Game To Freeze

Oh damn I realised my mistake now I didn't put x value inside the while loop same as all other of my code... Thanks for correcting me now I understand. Oh and yeah it works even without declaring it in separated function it can be all done in main() function. To answer your question yes it does noth...
by Nero
Mon Jan 14, 2019 8:20 am
Forum: Ren'Py Questions and Announcements
Topic: While Loop Causing Game To Freeze
Replies: 4
Views: 417

Re: While Loop Causing Game To Freeze

Yes I did however I made typing mistake when creating example. Thats how I called it if that's what you meant:

Code: Select all

$ Battle.mainBattle()
Tried making x = 0 outside the init python declared global x in within the method still same problem :/
by Nero
Mon Jan 14, 2019 12:10 am
Forum: Ren'Py Questions and Announcements
Topic: While Loop Causing Game To Freeze
Replies: 4
Views: 417

While Loop Causing Game To Freeze

Im doing battle system inside of python however game freezes after i try to run my code. When I do exactly same thing while in renpy scrip game seems to run fine. Where is the problem? init python: class Battle(object): def __init__(self,characters): self.characters = characters @staticmethod def ch...
by Nero
Sat Jan 12, 2019 7:13 pm
Forum: Ren'Py Questions and Announcements
Topic: Need Help With Lists In Python
Replies: 2
Views: 273

Re: Need Help With Lists In Python

Awesome thanks didn't know you could use class directly like that I thought I always need to create a variable for it to be used. Since you used object like that so is there a way object can be used in text renpy without needing to define variable? What i mean is this is how you do it by defining th...
by Nero
Fri Jan 11, 2019 8:20 pm
Forum: Ren'Py Questions and Announcements
Topic: Need Help With Lists In Python
Replies: 2
Views: 273

Need Help With Lists In Python

I will be quick you will understand my problem better if you run this code as I explained it detailed in game script. Now I will try to explain it here what was on my mind when I tried to code this. So basically I have created 2 Players which are inside of the list players=[bob, jack] and 1 Ailment ...
by Nero
Sun Dec 16, 2018 10:14 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]How to check if variable is in self.list
Replies: 4
Views: 319

Re: How to check if variable is in self.list

In my case it does that for example if I have list with 5 (spells) in it and I declared each spell have duration time in class Debuff .. so if I create function that will run every turn (turn based game) and function will do duration -= 1 every time it loops ... if I dont use deepcopy the cooldown d...
by Nero
Sun Dec 16, 2018 7:08 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]How to check if variable is in self.list
Replies: 4
Views: 319

Re: How to check if variable is in self.list

Yeah I know tried it myself but you have idea how to work around it with deepcopy?
by Nero
Sun Dec 16, 2018 12:26 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]How to check if variable is in self.list
Replies: 4
Views: 319

[SOLVED]How to check if variable is in self.list

I was wondering if there is a way I could check if self.list (self.status) holds variable poison. I tried doing it this way but it doesn't work... Any ideas how to fix this problem? init python: class Player(object): def __init__(self,name): self.name = name self.status = [] def add_spell(self, spel...
by Nero
Fri Dec 14, 2018 3:16 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Need help on improving my code with Players and Skills
Replies: 11
Views: 989

Re: Need help on improving my code with Players and Skills

Wow that's some real good teaching effort and explanation right here well done I enjoyed reading this. Case B looks most attractive also even I like that you posted other options of doing this. I used to write noob codes that had 2000 lines and it got old pretty fast that is why I want to do things ...
by Nero
Fri Dec 14, 2018 11:56 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Need help on improving my code with Players and Skills
Replies: 11
Views: 989

Re: Need help on improving my code with Players and Skills

Interesting it works now its first time I see something like this used in code though "from copy import deepcopy" I'm going to read about it on internet. Well it all works now as it should if anyone have more suggestions how to improve the code feel free to post. And thanks for help guys!
by Nero
Fri Dec 14, 2018 10:15 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Need help on improving my code with Players and Skills
Replies: 11
Views: 989

Re: Need help on improving my code with Players and Skills

Okay so I get it Python uses one list as I defined them self.status = status(global list for every player I can see this method can be used somewhere else in my project) instead of using self.status = [] (separated list for each player) . Is it really necessary to have list with list = [None] in it ...