SamuKata
TwizSin Games
TwizSin Games

patreon


A much better video showing what I have done.

Also my notes for the last 2 days.

Add the upgrade conversations to each character.

Figure out why the hover images are not working correctly.

 - OK sorted that issue out pretty quickly. It was a simple layering issue. Learning time!

 So the way that Ren'py works is in Layers. Think about that tracing paper that you can see through.

 So I had the code like this:

Obviously that may look complicated for you. But let's take it line by line and also use Comments to explain each line. So the code is before the # my comment to explain the line is after the #.


screen rudemerc04(): # This is just the name of the Screen   
$ persistent.current_screen = "rudemerc04" # This line is just so the game knows which screen it should be on.   
if timeOfDay <= 1: # This is pretty self explanatory IF the Time of Day is Less than or Equal to 1 do this stuff.        
imagebutton auto "rudemercofficedoor1_%s": # This is the name of the imagebutton. And by putting auto it makes it so I don't need to write 1 line for the idle image and 1 for the hover image           
focus_mask True # This line means the ONLY space that is clickable is where the image should be.           
tooltip "Office Door" # This is the Tooltip. Whatever is in the quotes here is what is shown when you hover your mouse over the door.           
if OfficeUpgrade == 0 and demoncontinent == 7: # This is checking the OfficeUpgrade variable and the demoncontinent variable. If both variables are True it goes to the rudeoffice03 section of code, if not they go to the rudeoffice01                
action Jump('rudeoffice03')           
else:               
action Jump('rudeoffice01')       
if MercUpgrade <= 2: # This is checking the MercUpgrade Variable and adding the background image to the screen           
add "demoncontinent/rudemerc04_1_1.png" # This is the name of the background image, and where the game can find it in the game folder.       
elif MercUpgrade == 3:  # This is checking the MercUpgrade Variable and adding the background image to the screen           
add "demoncontinent/rudemerc04_2_1.png"   
elif timeOfDay <= 3: # The rest of the lines should be easy to understand now if you were reading the comments before.       
imagebutton auto "rudemercofficedoor2_%s":           
focus_mask True           
tooltip "Office Door"           
action Jump('rudeoffice01')       
if MercUpgrade <= 2:           
add "demoncontinent/rudemerc04_1_2.png"       
elif MercUpgrade == 3:           
add "demoncontinent/rudemerc04_2_2.png"   
elif timeOfDay <= 5:       
imagebutton auto "rudemercofficedoor3_%s":           
focus_mask True           
tooltip "Office Door"           
action Jump('rudeoffice01')       
if MercUpgrade <= 2:           
add "demoncontinent/rudemerc04_1_3.png"       
elif MercUpgrade == 3:           
add "demoncontinent/rudemerc04_2_3.png"   
imagebutton auto "arrow2_%s": # This section is just the code for the arrow        xpos 0.9       
ypos 0.85            
tooltip "Turn Around"       
action Jump('rudemerc05')   
use topBar # This line is used to make sure your top bar UI is shown.   
$ tooltip = GetTooltip() # This line and the next 2 under it are just saying Hey if it says tooltip. Show what the tooltip says when you highlight it.   
if tooltip:       
text "[tooltip]"

OK So now that you have a basic understanding of the code. The issue was layers. Ren'Py adds images the order they appear in the code top to bottom. So I was adding the clickable imagebutton first. Then putting the background overtop of it. Simply swapping them, fixed it. I will show you how using the time of day 5 version since I didnt put comments there. But I would have to go through and just swap them all.
elif timeOfDay <= 5:   
if MercUpgrade <= 2:     
add "demoncontinent/rudemerc04_1_3.png"   
elif MercUpgrade == 3:     
add "demoncontinent/rudemerc04_2_3.png"   
imagebutton auto "rudemercofficedoor3_%s":     
focus_mask True     
tooltip "Office Door"     
action Jump('rudeoffice01')
So this is all it took to fix it. See how the Image button code was just cut and moved down to the bottom? Thats all it took. Makes me feel dumb for making such a rookie mistake then showing it to you all in that video.... This is why I was saying I wasn't ready to make the video yet. But yea this whole section was written at 1pm. I only slept 4 hours. I had to wake up early and run some errands. Then it kept bugging me that I didnt figure that stuff out before bed last night. So I figured it out and added it all here so I can fix it all when I wake up.

Found a bug, Characters are still in their room when they dont have a bed yet. So the imagebutton of them sleeping is there. But it is defaulting to the image of them just standing there in the day time. So theres like 2 of them... and one is like all demon floating and stuff. Kinda weird. To fix this. I should change the imagebutton for the door. To not allow the player in the room at night time UNLESS the player has already bought them a bed. Either that or just make the room empty...? Who knows. pick one later and go with it.
Fixed the Wait button bug. Added All the new base maps to the map categories so that I can create a map for the new base, and a demon continent map. Then I also will need a world map.
Remake the bathroom. I want to make the bath an in-ground one instead.
Make Aisha Appear in her Bedroom when clicking her door with demoncontinent == 7 Where she will talk to you about getting her a bed. That should then trigger a second variable. Currently unnamed. This variable + the demoncontinent variable will be then used to stock an inventory of an NPC in the market. The player will then go to the market and buy the bed and desk for Aisha. After that, They should install them. at that point, Roxy and Rokari should appear in the new base. Talking to them tells you to get their beds and your own. Repeat previous steps.
Coded entire storyline UP UNTIL the point where I stopped getting images, so only like 15% of it. But it is up to when the new base is unlocked, allowing me to test out the new base and properly build the city now. But that also made me think AH the map. Then 6 hours later... I am still trying to rework the map system to allow for it. I believe the issue I am having is the way the system worked that I created before was like this
CITY>Building
And now I am trying to add another branch of that entire thing.
WORLD>CITY>Building
And It does not seem to like that. Like... at all.. I made some images in photoshop to use for the World map, city map, and the relevant Icons.And made some tester code but when I click the map literally nothing is coming up...at all...So... Whoops..
Halfway got it working. Tryin to figure out why it works fine in brand new saves, AND in one of my saves where I am in the Home area. BUT when I am in the Demon Continent base it refuses to work. But also when I force it to appear using the call screen command. It works fine.....? Well in the process of trying to sword this all out. I added a new UI element. Nice Names. Also acts like a way to make sure if it is tracking the correct screen. On the TopBar now in the dead center is shows the map name for the map you are currently on. But in a eye friendly way. Like instead of sayingtown11. Which is one of the 13 different town maps in ranoa. It just says Ranoa. idk it was a neat way for me to make sure it was keeping track of screens correctly. Turns out it is... on the new demon continent stuff. But not the old stuff.... Could be the cause of some of the crashes we saw from players before. But adding it to my list of stuff to do. Just like when I was just messing around clicking in the house trying to watch if the screen name changed like it should I clicked on the Dining room and BOOM back to main menu. IDK why. But it just yeeted me out of the game so fast I had to double take at it. Then wanted to give it a stern talking to. But I am ready for a nap or something lol. Currently working on getting the World Map, Rikarisu Map, Demon Base Maps, all working to make teleportation easier later.
Cancel on the select Skills to combine is forcing the game back to the main menu. Possible fix swap it from Return() to Jump("study")Issues with using Jump means I can not use the combine skills function anywhere else but the study. Finished the BASIC's of the town map. No NPCs are in the town yet, but I made the screens for moving around, all 40 screens are done, to manually walk around the 7 different main locations. during some bug testing I noticed some of it doesnt feel right, needs further fine tuning. Adjusting what moves you where kinda thing. Should have the screens and movement done today. Then will be able to get started on the NPC which sells furnature. Kind of the most important NPC in the entire update. Also need to make some imagebuttons because while you can now leave the base, you have no way back inside. Need imagebuttons for both town outskirts, town exit, Inn, and Tavern. Training grounds doesnt need one as that area will mostly be unused until update 2. This update will only have 1 conversation with Kishirika take place there, other than that its useless and only something I made ahead of time for the next update. Actually I still need a path to an alley location technically but, there are plenty of alleys already in the town so I could literally just pick one of those for the Kishirika conversation to take place in.... so fuck it.


Locations needed in the city:
Path to town Exit - Done - Images and Coding Completed
Path to Inn - Done - Images and Coding Completed
Path to Tavern - Done - Images and Coding Completed
Path to Training area - Done - Images and Coding Completed
Path to outskirts - Done - Images and Coding Completed
Path to Market Stalls - Done - Images and Coding Completed
Link All Paths back to Base - Done - Images and Coding Completed
Food Stalls - Not Done

Town Camera Notes
Outside = Outside of Base Facing Away
dctown01 = At the End of Road Facing Away from base
dctown02 = Facing toward Town Exit and Market
dctown03 = Town Exit to Forest
dctown04 = Town Entrance Facing dctown02
dctown05 = Same Location as dctown03, Facing towards Base
dctown06 = Same Location as dctown02, Facing towards Base
dctown07 = Same Location as dctown01, Facing towards Base
dctown08 = Same location as Outside, Facing towards Base
dctown09 = Connects to dctown06 facing towards Market
dctown10 = Same Locationg as dctown09 Facing towards Base
dctown11 = Connects to dctown09 Facing towards Market
dctown12 = Same Location as dctown11 Facing towards Base
dctown13 = Facing towards Base/town exit connected to dctown03 and dctown14
dctown14 = facing towards Inndctown15 = At Inn
dctown16 = Leaving Inn Facing 14 same location as 15
dctown17 = Facing back to Market same location as 18 connects to 11
dctown18 = facing away from market
dctown19 = connects to 18
dctown20 = Training ground
dctown21 = connects back to 19 turning away from training ground
dctown22 = connects to town01 facing back towards town01
dctown23 = same location as 22 but facing to 24
dctown24 = moved forward from 23 looking to 26
dctown25 = same location as 24 but looking at 22
dctown26 = Moving forward from 24 but looking back toward base/24
dctown27 = same location as 26, looking to bridge out of town
dctown28 = same location as 26 looking to church
dctown29 = same location as 30 but looking back at 26
dctown30 = Forward from 26 looking to church
dctown31 = forward from 30 looking to outskirts
dctown32 = same location as 31 looking back to 29
dctown33 = outskirts facing back towards base/31
dctown34 = outskirts
dcmarket01 = Connects to dctown11 Facing into Market
dcmarket02 = Look right from market01
dcmarket03 = Look Left from market01
dcmarket04 = Forward from market01, Connects to Tavern and FurnatureVender
dcmarket05 = Same Location as Market01 but leaving Market. Connects to dctown11
dcmarket06 = Same location as dcmarket04 but leaving Market.
Tavern = Foward from dcmarket04
leaveTavern = After Exiting Tavern would connect to dcmarket06, then 05
FurnatureVender = connects to dcmarket04

A much better video showing what I have done.

More Creators