Thanks for the advices! I’ll keep an eye out next time with what my friend suggests me to do. I’ve had success a few times beforehand consulting him thus my trust in asking him. As for the error, I practically have done nothing to the project this last hour, figuring out what’s wrong and right now
the naming scheme with the added “s” wont work but the original variable names work.. I really don’t know anymore. Maybe my Godot is freaking out but I have tried closing and reopening as I’ve mentioned before but the error for a specific names for each arrays still persist.
As for the Dialogue.tres
file, the arrays in its properties are shown as (Nil) even though it is full of lines. The array format of the green censored variable is exactly the same as the others, yet for some reason it shows as Array (size 2) instead of (Nil). This has been the case ever since before this error even occurred and yet the game had run without issues.
a section from the dialogue.gd
script:
@export var event_arrays = [
{"love_req": 0, "day_req": 0, "mood_req": 0, "hour_req": 0, "love_giv": 2, "mood_giv":5, "hour_skip":0,
"dialogue_array": [
{"sbj":"You","dlg":"Do you mind telling me what happened?", "eyes":eyes_closed_brows_up, "mouth":mouth_open_o, "blush":false, "sorrow":false,"sweat1":false,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"sbj":"Natsume","dlg":"I.. got fired from my job", "eyes":eyes_sideeye, "mouth":mouth_open_smile, "blush":false, "sorrow":false,"sweat1":true,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"sbj":"Natsume","dlg":"I made a major mistake at work and they decided to fire me for it", "eyes":eyes_closed_brows_up, "mouth":mouth_smile, "blush":false, "sorrow":false,"sweat1":false,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"sbj":"Natsume","dlg":"My workplace was supposed to pay for my rent but since I got fired I had nowhere else to go..", "eyes":eyes_closed_brows_down, "mouth":mouth_frown, "blush":false, "sorrow":false,"sweat1":false,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"sbj":"Natsume","dlg":"I got by with the money I had left staying at a manga cafe", "eyes":eyes_closed_brows_down, "mouth":mouth_frown, "blush":false, "sorrow":false,"sweat1":false,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"sbj":"Natsume","dlg":"But I ran out of funds after a few days", "eyes":eyes_closed_brows_down, "mouth":mouth_open_smile, "blush":false, "sorrow":false,"sweat1":false,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"sbj":"Natsume","dlg":"I had nowhere else to go and I was hesitant but eventually I decided to ask you for some help", "eyes":eyes_closed_brows_down, "mouth":mouth_open_smile, "blush":false, "sorrow":false,"sweat1":false,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"sbj":"Natsume","dlg":"And here I am now", "eyes":eyes_closed_brows_down, "mouth":mouth_open_smile, "blush":false, "sorrow":false,"sweat1":false,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"dlg":""}
]
},
{"love_req": 0, "day_req": 1, "mood_req": 0, "hour_req": 0, "love_giv": 2, "mood_giv":5, "hour_skip":0,
"dialogue_array": [
{"sbj":"You","dlg":"Here, I thought you could use these.", "eyes":eyes_default, "mouth":mouth_frown, "blush":false, "sorrow":false,"sweat1":false,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"sbj":"Natsume","dlg":"Clothes?", "eyes":eyes_default, "mouth":mouth_open_o, "blush":false, "sorrow":false,"sweat1":true,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"sbj":"You","dlg":"They're my sister's.", "eyes":eyes_default, "mouth":mouth_frown, "blush":false, "sorrow":false,"sweat1":true,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"sbj":"You","dlg":"She makes me keep some clothes for her so she doesn't have to bring too much baggage whenever she visits", "eyes":eyes_default, "mouth":mouth_frown, "blush":false, "sorrow":false,"sweat1":true,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"sbj":"Natsume","dlg":"I have to thank your sister too then", "eyes":eyes_closed_brows_up, "mouth":mouth_open_smile, "blush":false, "sorrow":false,"sweat1":true,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"sbj":"Natsume","dlg":"I'll try them on", "eyes":eyes_default, "mouth":mouth_open_smile, "blush":false, "sorrow":false,"sweat1":true,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"sbj":"You","dlg":"Eh, now?", "eyes":eyes_default, "mouth":mouth_smile, "blush":false, "sorrow":false,"sweat1":true,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"sbj":"Natsume","dlg":"Turn around for a sec.", "eyes":eyes_default, "mouth":mouth_open_smile, "blush":true, "sorrow":false,"sweat1":true,"clothes":clths_office_shirt,"hair":hair_pony,"girl": true},
{"sbj":"You","dlg":"...", "eyes":eyes_default, "mouth":mouth_open_smile, "blush":true, "sorrow":false,"sweat1":true,"clothes":clths_office_shirt,"hair":hair_pony,"girl": false},
{"sbj":"Natsume","dlg":"So..", "eyes":eyes_default, "mouth":mouth_open_smile, "blush":false, "sorrow":false,"sweat1":true,"clothes":clths_office_shirt,"hair":hair_pony,"girl": false},
{"sbj":"Natsume","dlg":"So.. How do I look?", "eyes":eyes_default, "mouth":mouth_open_smile, "blush":false, "sorrow":false,"sweat1":true,"clothes":clths_home,"hair":hair_pony,"girl": true},
{"sbj":"You","dlg":"I'm glad it fits?", "eyes":eyes_default, "mouth":mouth_smile, "blush":false, "sorrow":false,"sweat1":true,"clothes":clths_home,"hair":hair_pony,"girl": true},
{"sbj":"Natsume","dlg":"Geez..", "eyes":eyes_default, "mouth":mouth_open_o, "blush":true, "sorrow":false,"sweat1":true,"clothes":clths_home,"hair":hair_pony,"girl": true},
{"sbj":"You","dlg":"..?", "eyes":eyes_default, "mouth":mouth_open_o, "blush":false, "sorrow":false,"sweat1":true,"clothes":clths_home,"hair":hair_pony,"girl": true},
{"dlg":""}
]
},
{"love_req": 9, "day_req": 2, "mood_req": 0, "hour_req": 0, "love_giv": 0, "mood_giv":0, "hour_skip":0,
"dialogue_array": [
{"sbj":"Natsume","dlg":"I'd like to thank you again for letting me stay", "eyes":eyes_default, "mouth":mouth_smile, "blush":false, "sorrow":false,"sweat1":false,"clothes":clths,"hair":hair_pony,"girl": true},
{"sbj":"Natsume","dlg":"It's been a couple days already..", "eyes":eyes_default, "mouth":mouth_smile, "blush":false, "sorrow":false,"sweat1":false,"clothes":clths,"hair":hair_pony,"girl": true},
{"sbj":"Natsume","dlg":"I feel like I'm a bother, so I'll try to get out of your hair as soon as possible", "eyes":eyes_default, "mouth":mouth_smile, "blush":false, "sorrow":false,"sweat1":false,"clothes":clths,"hair":hair_pony,"girl": true},
{"sbj":"You","dlg":"...", "eyes":eyes_default, "mouth":mouth_smile, "blush":false, "sorrow":false,"sweat1":false,"clothes":clths,"hair":hair_pony,"girl": true},
{"dlg":""}
]
}
]
@export var ###_seq = [
{"love_req": 0, "day_req": 0, "mood_req": 0, "hour_req": 0, "love_giv": 0, "mood_giv":0, "hour_skip":0, "###_event":0,
"dialogue_array": [
{"sbj":"You","dlg":"#########"},
{"dlg":""}
]},
{"love_req": 0, "day_req": 0, "mood_req": 0, "hour_req": 0, "love_giv": 0, "mood_giv":0, "hour_skip":0, "###_event":0,
"dialogue_array": [
{"sbj": "You","dlg":"########"},
{"dlg":""}
]}]
a section from the main.gd
script:
func _on_casual_pressed() -> void:
var event = text.event_arrays[values.enc_events]
if values.love >= event.get("love_req") and values.day >= event.get("day_req") and values.mood >= event.get("mood_req"):
chosen = event.get("dialogue_array")
values.enc_events += 1
$Girl/Eyes.texture = chosen[line].get("eyes")
$Girl/Mouth.texture = chosen[line].get("mouth")
$Girl/Blush.visible = chosen[line].get("blush")
$Girl/Sorrow.visible = chosen[line].get("sorrow")
$Girl/Sweat1.visible = chosen[line].get("sweat1")
$Girl.visible = chosen[line].get("girl")
clothes_func(chosen[line].get("clothes"))
hair_func(chosen[line].get("hair"))
values.love += event.get("love_giv")
values.mood += event.get("mood_giv")
values.hour += event.get("hour_skip")
else :
chosen = text.cas_dict[randi_range(0,2)]
values.love += randi_range(2,4)
values.mood -= randi_range(1,3) * double
$Girl/Eyes.texture = chosen[line].get("eyes")
$Girl/Mouth.texture = chosen[line].get("mouth")
$Girl/Blush.visible = chosen[line].get("blush")
$Girl/Sorrow.visible = chosen[line].get("sorrow")
$Girl/Sweat1.visible = chosen[line].get("sweat1")
clothes_func(chosen[line].get("clothes"))
hair_func(chosen[line].get("hair"))
basically if an event requirement is fulfilled clicking casual button will play an event, but if there are no even requirements fulfilled it will instead play the casual dialogues
I’m aware there are a lot of improvements to be made but my issue right now is still that variable naming problem
As of the end of typing this, I’ve literally not touched my project, and it has gone back to anything but the correct names NOT working.
edit: imma try restarting my computer..