Mcnz

joined 1 day ago
[โ€“] Mcnz@lemmy.world 1 points 20 hours ago

Thank you! I could have been more clear about my code lol. I was trying to get the LLM to think of how difficult a task would be. Then the player would roll a d100, and add their skill, to see if they succeed.

[โ€“] Mcnz@lemmy.world 1 points 21 hours ago (2 children)

Thanks, that helps a lot! It seems that the challenge "difficulty" and the dice "roll" always come out to the same number? I cant quite tell why. Do you know? I'm looking through the code, but a lot of this stuff is new to me, so I'll try to take a look through it again tomorrow to maybe understand it better.

Either way, this is a big leap forward for me. Thanks!

 

Line 45-49, I am trying to make it do math, and then go to $output. I'll put an example here of what is currently happening, and then what I am trying to achieve.

Current:

You are trying to convince a guard to let you into a restricted area.

Difficulty: 60

Skill: Charisma

undefined + undefined = undefined

Expected example:

You are trying to convince a guard to let you into a restricted area.

Difficulty: 60

Skill: Charisma

50 + 22 = 72

On line 47 there is also a more specific issue, according to the red line highlighting it. The text ai was used to generate something like "Skill: Charisma" earlier in the code. Then on line 47, it is getting rid of the "Skill: " so all that remains is "Charisma". There was a variable set at line 11 which shows the value of "Charisma".

Hopefully I explained this well enough. Thank you for your assistance everyone!

(Edit: Put a line break in the output, to more closely match the output from the program)