IN game saving

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
BLACK_PHOENIX
Posts: 126
Joined: Wed Sep 27, 2006 6:42 am

IN game saving

Post by BLACK_PHOENIX »

can some one tell me how to script a npc conversation asking me whether i want to save.

eg,

i come to a npc or actor(computer) and i press a key to activate a conversation. the npc asks me to save.

i have 2 options; cancel and save

if i click on cancel it quits the conversation and resumes the game
if i click save then i choose a slot to save in a mini menu and save. then i click ok and it resumes the game.

i also want to know how to make an entity a save. so when i go over it or i finish the level it asks me to save.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

To my knowledge saving can't be scripted. At least I don't remember anyone doing that...
Pain is only psychological.
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post by jonas »

The only saving rf can do in game via scripts is saving attributes to a file. But I don't think it has a feature to load attributes from a file :?
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
User avatar
BLACK_PHOENIX
Posts: 126
Joined: Wed Sep 27, 2006 6:42 am

Post by BLACK_PHOENIX »

the in-game loading doesent matter as long as the game can produce a save file wich i can load from the menu.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Yeah well, that's the problem. I believe there is no way to produce that save file with a script... The only way to do that is to save manually in the menu.
Pain is only psychological.
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

really i was talking seriously:
viewtopic.php?t=1495&highlight=

Do you want an RF build with that commands?
User avatar
BLACK_PHOENIX
Posts: 126
Joined: Wed Sep 27, 2006 6:42 am

Post by BLACK_PHOENIX »

Grazie federico :D

thats great. could u please compile ur rf version for me.
i cant really compile it properly on my pc.

u can post it as a link. i just want the Reality Factory exe file.
could u also please change the name of the reality factory log and ini file

i want tochange the name of

RealityFactory.ini to data.ini

realityfactory.txt to Gdata.txt

:D
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

could u also please change the name of the reality factory log and ini file
i want tochange the name of
RealityFactory.ini to data.ini
realityfactory.txt to Gdata.txt
sorry, no. I don't want to make change without a sense. What is the purpouse of the change?

Anyway here's the link of a standard (not Tokaphysics powered) build of RF including the LoadAttributeEntity and SaveAttributeEntity lowlevel command:
http://files.filefront.com/RealityFacto ... einfo.html[FIXED]

SaveAttributesEntity(char *szSaveFile,char *EntityName)
LoadAttributesEntity(char *szSaveFile,char *EntityName)

it saves and loads the attributes of the specified pawn. I suggest to combine the szSaveFile (the name of the file containing the attributes) with EntityName of the pawn. For example:
SaveAttributesEntity(EntityName # ".ini",EntityName);
will write, if the pawn is named for example MY_PAWN, a file name MY_PAWN.ini containing the attributes and their values.
I hope this was what you and Juutis were looking for.
Last edited by federico on Sun Nov 12, 2006 3:44 pm, edited 1 time in total.
User avatar
BLACK_PHOENIX
Posts: 126
Joined: Wed Sep 27, 2006 6:42 am

Post by BLACK_PHOENIX »

i cant start it.

it says im missing vorbisfile_d.dll
where do i put the libs in
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Hey this is awesome! Is it the latest RF version?
Pain is only psychological.
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

sorry I was probably out of mind because I packed and sent the debug build of RF (that's why it was searching for a "_d.dll" file).

I fixed the link in the previous post. The new link is:
http://files.filefront.com/RealityFacto ... einfo.html

Yes it should be the last version of RF, anyway it's the last source released.
User avatar
BLACK_PHOENIX
Posts: 126
Joined: Wed Sep 27, 2006 6:42 am

Post by BLACK_PHOENIX »

sorry im not a very good scripter. wht do i do.
im using the red virgil as a pawn.
Post Reply