I want to create a AI

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.
Post Reply
Message
Author
ByFreddyFUN
Newbie
Posts: 17
Joined: Mon Dec 31, 2018 7:29 pm
Deviantart: ByFreddyFUN
Skype: juanvittori1
Contact:

I want to create a AI

#1 Post by ByFreddyFUN »

Hi! Im creating a Visual Novel In renpy, and i like what one of the characters, have, in a moment of the story Artificial Inteligence.
For example:
I want command to can

-Auto save the game
-Call you for your PC Username
-Turn Of your PC
-Know the Day Date (Checking the Calendar)
-Delate Files

You can help me?

Mutive
Veteran
Posts: 344
Joined: Tue Nov 21, 2017 2:23 am
Completed: Eidolon, Minion!, Love Furever, Epilogue
Contact:

Re: I want to create a AI

#2 Post by Mutive »

I have code for all of this created either in my game or sandbox.

The time/date functions in Renpy will provide the date function pretty easily. You can look into the user documentation for that. I believe it also contains the PC username + autosave functions. (I'm assuming you want to autosave at certain points?)

As for turning off the PC and deleting files, a lot of that is actively *harmful*. May I ask why you want to do this? (Doing both of these two things through Renpy will involve going directly into Python and using various system operations packages.)

(Also, none of these things "creates an AI". An AI is far, far more sophisticated than being able to screw around with system files or figure out the time and date...)
Enjoy Eidolon, my free to play game at: https://mutive.itch.io/eidolon, Minion! at: https://mutive.itch.io/minion or Epilogue at: https://mutive.itch.io/epilogue

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: I want to create a AI

#3 Post by isobellesophia »

Talking to the AI is better than controlling the game, or maybe possibly the PC itself, RenPy cannot interact outside the game or simply the pc (i think python can or some sort, java for example.)

Date and time is better indeed, just like Mutive said above it is very harmful.

AI visual novel is what i recommend to you, i could help a few or more.
I am a friendly user, please respect and have a good day.


Image

Image


jdhthegr8
Regular
Posts: 33
Joined: Tue Feb 26, 2019 2:48 pm
Projects: Fractured Spirits- A war drama set in a fictional world with WW2/Cold War themes
Contact:

Re: I want to create a AI

#4 Post by jdhthegr8 »

Reading information from the computer environment is much different from actually sending commands for it to do things. This type of thing is probably possible to write, but even if you did write something that sent these commands, it would be blocked either by a virus scanner detecting an unusual request during heuristic analysis or blocked by the operating system itself.

Windows throws a fit just over me running a program that can change the system volume; I can't imagine it would treat an application issuing a shutdown command with kid gloves.

jdhthegr8
Regular
Posts: 33
Joined: Tue Feb 26, 2019 2:48 pm
Projects: Fractured Spirits- A war drama set in a fictional world with WW2/Cold War themes
Contact:

Re: I want to create a AI

#5 Post by jdhthegr8 »

Now if you wanted to get at least some of the dramatic effect of "shutting down", there are definitely ways to unexpectedly close the game. And it is capable of editing files within its own directory, saving automatically at a designated point, or reading environment variables like the PC name. Beyond that though, you will face issues getting it to run and perform bigger actions without disruption (and people probably wouldn't want you to!)

Mutive
Veteran
Posts: 344
Joined: Tue Nov 21, 2017 2:23 am
Completed: Eidolon, Minion!, Love Furever, Epilogue
Contact:

Re: I want to create a AI

#6 Post by Mutive »

jdhthegr8 wrote: Fri Jun 12, 2020 3:02 am but even if you did write something that sent these commands, it would be blocked either by a virus scanner detecting an unusual request during heuristic analysis or blocked by the operating system itself.
FWIW, neither Windows (I was also running Norton virus scanner) nor Steam stopped me from doing either in my game. (I didn't publish it with a full shut down, although I experimented with it a bit. I did delete/write/open files, but it was all harmless.) So while I would *hope* this kind of thing would be stopped (as it could be made malicious quite easily), I wouldn't count on these requests being caught, either.

So they won't necessarily be *blocked*. But I'm also really hesistant to give out the code for shutting down the computer/writing files/running files/deleting files without a *really* good idea as to what the user is planning to do. (And would urge others to do the same.)
Enjoy Eidolon, my free to play game at: https://mutive.itch.io/eidolon, Minion! at: https://mutive.itch.io/minion or Epilogue at: https://mutive.itch.io/epilogue

jdhthegr8
Regular
Posts: 33
Joined: Tue Feb 26, 2019 2:48 pm
Projects: Fractured Spirits- A war drama set in a fictional world with WW2/Cold War themes
Contact:

Re: I want to create a AI

#7 Post by jdhthegr8 »

Huh, that's both interesting and just a bit concerning to hear from you Mutive! For what it's worth though, I'd imagine most malicious actors would have far better and more efficient attack vectors to do bad things with than Ren'Py. Your response has gotten me quite curious though...

With that knowledge gained though, what I'd say to OP as far as the practicality of putting a forced shutdown into a serious VN goes is that the biggest issue is the risk it puts onto your players without their knowledge or consent. What if a player happens to have had a super important file open that is lost because of the system restart? If it has the ability to do that and you don't offer a serious warning related to this that is clearly visible to the player when they run the game, then it could put you under liability for any damage that may result.

Mutive
Veteran
Posts: 344
Joined: Tue Nov 21, 2017 2:23 am
Completed: Eidolon, Minion!, Love Furever, Epilogue
Contact:

Re: I want to create a AI

#8 Post by Mutive »

jdhthegr8 wrote: Mon Jun 15, 2020 1:54 pm Huh, that's both interesting and just a bit concerning to hear from you Mutive! For what it's worth though, I'd imagine most malicious actors would have far better and more efficient attack vectors to do bad things with than Ren'Py. Your response has gotten me quite curious though...
It's a pretty efficient attack vector as you can access Python through it. (I used all the commands to write/open/run/delete through Python...) But I agree that creating a VN as an attack vector would be *weird*. They're just not popular enough that I think it would be worth the effort, at least compared to putting malicious code into something more popular.

(Although who knows? If nothing else, I feel that it's worth warning that such things are possible!)
With that knowledge gained though, what I'd say to OP as far as the practicality of putting a forced shutdown into a serious VN goes is that the biggest issue is the risk it puts onto your players without their knowledge or consent. What if a player happens to have had a super important file open that is lost because of the system restart? If it has the ability to do that and you don't offer a serious warning related to this that is clearly visible to the player when they run the game, then it could put you under liability for any damage that may result.
Yeah, I avoided doing this in the game for that reason. It just seemed like a *bad idea*. (Even if it was pretty cool to suddenly have the system shutting down after the player irritated a character sufficiently.) I did the $ renpy.quit() workaround as it achieves more or less the same goal with no potential for harm. (You can even autosave the game before doing it.) It's also a command within Renpy, which makes it really easy to figure out how to do. (Literally just type $ renpy.quit() )
Enjoy Eidolon, my free to play game at: https://mutive.itch.io/eidolon, Minion! at: https://mutive.itch.io/minion or Epilogue at: https://mutive.itch.io/epilogue

imazariuz
Newbie
Posts: 6
Joined: Sun Dec 27, 2020 3:19 pm
Contact:

Re: I want to create a AI

#9 Post by imazariuz »

How about modifying the games own file? Or detecting if a file is missing or added, like seen in DDLC? Does anyone know how to do it?

verysunshine
Veteran
Posts: 339
Joined: Wed Sep 24, 2014 5:03 pm
Organization: Wild Rose Interactive
Contact:

Re: I want to create a AI

#10 Post by verysunshine »

imazariuz wrote: Mon Dec 28, 2020 6:36 am How about modifying the games own file? Or detecting if a file is missing or added, like seen in DDLC? Does anyone know how to do it?
You could check if a file is present using python's file-opening functionality. What do you mean by "editing a game's files"?

There's a decompiled version of DDLC on Github.

Build the basics first, then add all the fun bits.

Please check out my games on my itch.io page!

User avatar
Chronocide
Regular
Posts: 77
Joined: Tue Feb 16, 2021 8:03 pm
Projects: Land of the 11 Towers
Contact:

Re: I want to create a AI

#11 Post by Chronocide »

ByFreddyFUN wrote: Sat Jan 04, 2020 12:07 am Hi! Im creating a Visual Novel In renpy, and i like what one of the characters, have, in a moment of the story Artificial Inteligence.
For example:
I want command to can

-Auto save the game
-Call you for your PC Username
-Turn Of your PC
-Know the Day Date (Checking the Calendar)
-Delate Files

You can help me?
Sounds a lot like Maleware or a virus.

Do you really need the PC program to be able to turn off the user's PC, to delete files on their PC, or to otherwise be able to look up your sensitive stored information?

A program that can do all these things may get flagged as malicious, is that risk worthwhile?

I've seen a lot of Ren'Py where they have a simulated PC as something that the protagonist interacts with. That would be a lot easier to program, plus you don't risk damaging their PC.

Post Reply

Who is online

Users browsing this forum: No registered users