|
Changing the Default Path Displaying 1-20 of 29 total.
12
next
Goldengamer111
|
I think that I remember reading about a function or string that, when called or edited, changed the default path that Verge would use when looking for files. Unfortunately, I have not been able to find it again. Does anyone know what this is, if it exists? Also, what are this forum's rules on double posting/frequency of creating new topics?
Posted on 2009-03-05 22:00:26
|
Overkill
|
I'm not entirely sure about this myself, despite being one of the developers. This gives me the impression that it was probably just talked about and not really added to the engine. I could be mistaken though.
However, as far as forum etiquette junk, I'll just say a couple guidelines I try following mostly. You should prefer to edit your posts over double posting.
But if a long enough period of time (about a day) has passed and you have something new to say in the same topic, feel free to add it. When quoting multiple people through separate replies you might find yourself double posting too, occasionally.
Don't bump a topic just because someone hasn't responded.
For help-related things, create a new topic whenever you have a new question to discuss. Things that are tied together, like a bunch of starting questions, or similar errors, you probably wanna put in the same thread.
In other forums, like General Discussion or Castle Heck you can post more frequently, just make engaging topics if possible!
A few new topics a week is what I'd call a "good" frequency for anyone. Replies to existing threads are fine as long as they're "recent".
Eek, I sound sort of robotic right now since I need sleep. Anyways, just think of it this way: Be friendly, but avoid being annoying, and you're set. :D
Posted on 2009-03-06 02:07:36
|
Goldengamer111
|
How would I go about using subfolders, then? I have the possibility of having a lot of maps, and grouping them in folders would help very much in keeping them organized. I tried putting the map-related files in one folder, to be expanded with more folders later, and calling "FolderName/MapName", but the maps wouldn't run, telling me that it couldn't find the .vsp file for my first room. I moved the .vsp files to the main folder, which is still more than I would like in there, but the map scripts wouldn't run (and wouldn't even after I moved them to the main folder; there is probably a problem in my code somewhere). Once the .vsp's and the .vc's are there, however, I might have just left everything in the system folder, as it has enough stuff to not make separating the files efficient.
Finally, a few last questions. Is there any way to change the icon and name of the (currently) verge.exe, is there any way that "patches" could be created without ruining save files, and in which file can I find Sully's "V3" splash screen?
EDIT: I am also having a problem with Maped: when I place an entity and reload the map, as well as run the game, the entity disappears.
Posted on 2009-03-06 08:06:17 (last edited on 2009-03-06 21:04:26)
|
Kildorf
|
Hey goldengamer, welcome to the forums! I'll try to see if I can sort out your questions for you... Please, if anyone else spots something I got wrong jump in and correct me.
Quote:Originally posted by Goldengamer111
How would I go about using subfolders, then? I have the possibility of having a lot of maps, and grouping them in folders would help very much in keeping them organized. I tried putting the map-related files in one folder, to be expanded with more folders later, and calling "FolderName/MapName", but the maps wouldn't run, telling me that it couldn't find the .vsp file for my first room. I moved the .vsp files to the main folder, which is still more than I would like in there, but the map scripts wouldn't run (and wouldn't even after I moved them to the main folder; there is probably a problem in my code somewhere). Once the .vsp's and the .vc's are there, however, I might have just left everything in the system folder, as it has enough stuff to not make separating the files efficient.
Unfortunately, Verge won't currently support having maps (or map code .vc files, or .vsp files) stuck in any folder other than the root folder (where you've got your verge3.exe). Believe me, I feel your pain. This is something I'd really like to see sorted out in the engine but just hasn't been cleared up yet. You know... I think I even remember looking into this and finding a really weird reason behind this but it's been a while... hrm.
Quote:Originally posted by Goldengamer111
Finally, a few last questions. Is there any way to change the icon and name of the (currently) verge.exe,
You can just rename verge.exe to whatever you want, it will still run fine. Changing the icon requires you to recompile the engine with a different icon stuck into the resources. There might be a better way to go about this but offhand I'm not sure what it is.
Quote:Originally posted by Goldengamer111
is there any way that "patches" could be created without ruining save files,
You're going to be writing your own save file saving and loading, so as long as you write it to deal with this, then it will. Sorry that this is kind of a weak answer, but there really is no 'official' verge savefile format or anything so it really comes down to your code.
Quote:Originally posted by Goldengamer111
and in which file can I find Sully's "V3" splash screen?
The whole intro thing is inside of v3splash320.vpk, which is a verge pack file. It's included by the line
mount1 v3splash320.vpk
in verge.cfg, and is called via
v3splash();
// or alternatively
callFunction("v3splash");
// which will try to call it but not fail badly if your forgot to
// mount the pack file
Quote:Originally posted by Goldengamer111
EDIT: I am also having a problem with Maped: when I place an entity and reload the map, as well as run the game, the entity disappears.
Okay seriously someone needs to release a fix for this. The problem here is that when you "Save" in Maped it doesn't always... save. The workaround here is to always use "Save As", which does not fall prey to the same problem. Again, I feel your pain. I really do.
Posted on 2009-03-08 21:51:56
|
Goldengamer111
|
Quote:Originally posted by Kildorf
Unfortunately, Verge won't currently support having maps (or map code .vc files, or .vsp files) stuck in any folder other than the root folder (where you've got your verge3.exe). Drat. I would be worse than useless at attempting to fix this, so all I can do is suggest this to someone (anyone want to fix this?), wait, and hope someone can find a way to work around that "really weird reason".
Quote:Originally posted by Kildorf
You can just rename verge.exe to whatever you want, it will still run fine. Changing the icon requires you to recompile the engine with a different icon stuck into the resources. There might be a better way to go about this but offhand I'm not sure what it is. Great! Now how would I recompile the engine?
Quote:Originally posted by Kildorf
You're going to be writing your own save file saving and loading, so as long as you write it to deal with this, then it will. Sorry that this is kind of a weak answer, but there really is no 'official' verge savefile format or anything so it really comes down to your code. So give VERGE a "default value" to use if the save doesn't include one? Also, how do most games record the data? Write it all to a file?
Quote:Originally posted by Kildorf
The whole intro thing is inside of v3splash320.vpk, which is a verge pack file. It's included by the line
mount1 v3splash320.vpk
in verge.cfg, and is called via
v3splash();
// or alternatively
callFunction("v3splash");
// which will try to call it but not fail badly if your forgot to
// mount the pack file
Great! I have got it to work (and made my screen smaller to allow for it). In reading Sully's verge.cfg and system.vc files to figure out how to make it work, I found how to enlarge the window, while retaining the same resolution - window_x_res and window_y_res. unfortunately, it's not working on my game (the window retains the dimensions of 320x240, not resizing to 640x480). How can I make this work?
Quote:Originally posted by Kildorf
The problem here is that when you "Save" in Maped it doesn't always... save. The workaround here is to always use "Save As", which does not fall prey to the same problem. ...Okay...that is...interesting. I'll try it when I get a chance, but why isn't this fixed?
Posted on 2009-03-09 16:19:45
|
pthaloearth
|
do this: windowSetSize(gamewindow,640,480);
Posted on 2009-03-10 12:22:11
|
ustor
|
Quote:Originally posted by Goldengamer111
Quote:Originally posted by Kildorf
Unfortunately, Verge won't currently support having maps (or map code .vc files, or .vsp files) stuck in any folder other than the root folder (where you've got your verge3.exe). Drat. I would be worse than useless at attempting to fix this, so all I can do is suggest this to someone (anyone want to fix this?), wait, and hope someone can find a way to work around that "really weird reason".
While the engine devs are certifiably awesome, waiting for them to find the time to add in your pet feature isn't the best plan. It's a little convoluted and could very easily cause more headaches than it solves, but I think you could put together a script side workaround for this.
If you made a wrapper for map() and, in it:
Copy the desired map/script/vsp files (as temp.* or something) from their subdirectory to the root directory using the file operations; this would probably be a little simpler in lua than vc.
Call map() on the newly created copy.
As long as you can overwrite the temp files while their previous versions were still loaded, you should be able to have no more than one set of files in your root directory, which is fairly minimal clutter.
It's been a long time since I used the built-in map format and I admit I haven't taken the time to be sure this is bulletproof. Concerns that come to mind:
I think you'd probably have to pass the vsp filename into the wrapper (unless you're using the same one for the whole game, then you could just make it a define); you can't get the vsp information from the map without opening it which, without the vsp file, would cause it to break.
You'd definitely be taking a speed hit from the extra read/writes, but if the organization is important enough, this coudl be worth it.
This would work now and not be too messy, I would think.
Posted on 2009-03-10 12:22:52
|
Goldengamer111
|
Thanks for the workaround, but I don't need it anymore. The problem (as Kildorf pointed out) was that Maped didn't always save the .map files. Just as long as I use Save As instead of Save (or possibly - untested - change a tile in the map and then change it back, just so Maped will think that something has changed), the entities will appear in the game. Also, I might have realized something about the problem which this thread is named after: that function might have been for LuaVerge (thanks for mentioning Lua in your post, ustor!). Still not sure about it, though.
Posted on 2009-03-10 20:18:13
|
ustor
|
No, no, that's a solution to the storing maps/scripts/vsps in someplace other than the root folder, not to fix the Maped saving issue. This way you could have a store a map file in "/map/continent_name/town_name.map" instead of just "/town_name.map" or whatever. Unless the two are problems are intertwined somehow or I've misunderstood what you want, which is entirely possible.
I haven't used .map files with LuaVerge, but I'm pretty confident that it doesn't have any extra operations that you can use to change the default file path.
Posted on 2009-03-10 22:06:37 (last edited on 2009-03-10 22:09:08)
|
Goldengamer111
|
Oh, sorry. I guess it was I who misunderstood. I don't think that it has that function either, but it might explain why I can't find it. I think that it would be nice if they added the ability to change the path, but I am fine without it. As I said before, though, I should be fine with keeping all of my files in the main folder for now, but I will consider your solution if my game expands greatly later.
Posted on 2009-03-11 09:25:23
|
Goldengamer111
|
Oh, sorry. I guess it was I who misunderstood. I don't think that it has that function either, but it might explain why I can't find it. I think that it would be nice if they added the ability to change the path, but I am fine without it. As I said before, though, I should be fine with keeping all of my files in the main folder for now, but I will consider your solution if my game expands greatly later.
EDIT: I am trying to set the in-game time to the player's computer, and have come up with the following code:
void RepExe() //I have this HookTimered in AutoExec
{
SetTime();
}
struct TrueTime
{
int TrueYear; // Line 30
int TrueMonth;
int TrueDayOfWeek;
int TrueDay;
int TrueHour;
int TrueMinute;
int TrueSecond;
}
void SetTime()
{ // Line 40
TrueTime.TrueYear = sysdate.year;
TrueTime.TrueMonth = sysdate.month;
TrueTime.TrueDayOfWeek = sysdate.dayofweek;
TrueTime.TrueDay = sysdate.day;
TrueTime.TrueHour = systime.hour;
TrueTime.TrueMinute = systime.minute;
TrueTime.TrueSecond = systime.second;
}
string WriteTime() // Line 50
{
string TwelveHour = TrueTime.TrueHour;
string AMPM = "A.M.";
if (TrueTime.TrueHour > 12)
{
TwelveHour = str(TrueTime.TrueHour - 12);
AMPM = "P.M.";
}
return TwelveHour + ":" + str(TrueTime.TrueMinute) + " " + AMPM;
} // Line 60
Unfortunately, it isn't working. I haven't tried commenting out the error-giving line yet, but I believe it will be the same throughout the code.
Quote: system.vc(41): "TrueYear" is not a recognized keyword or identifier!
Posted on 2009-03-12 07:54:00
|
ustor
|
Quote: Originally posted by Goldengamer111
struct TrueTime
{
int TrueYear; // Line 30
int TrueMonth;
int TrueDayOfWeek;
int TrueDay;
int TrueHour;
int TrueMinute;
int TrueSecond;
}
That only defines the components of the struct. To actually assign values, you'll have to create an instance of it, e.g:
TrueTime CurrentTime;
And then you'll need to set the values for that instance:
void SetCurrentTime()
{ // Line 40
CurrentTime.TrueYear = sysdate.year;
CurrentTime.TrueMonth = sysdate.month;
CurrentTime.TrueDayOfWeek = sysdate.dayofweek;
CurrentTime.TrueDay = sysdate.day;
CurrentTime.TrueHour = systime.hour;
CurrentTime.TrueMinute = systime.minute;
CurrentTime.TrueSecond = systime.second;
}
It's been a while since I did any vc/struct stuff, but hopefully that solves the problem.
Posted on 2009-03-12 15:23:25
|
Goldengamer111
|
Thanks! Another problem, now. When I try to load the game, it says that it cannot open system.vc. Why?
Posted on 2009-03-13 14:59:34
|
Overkill
|
You need to make sure that a system.vc exists in the exact same folder as verge.exe. It cannot be in a subfolder. But any script that system.vc might #include can be in separate folder (but must specifically listed with the relative path to it). There is no way to change this. system.vc must appear in the base folder of the engine.
Either that, or you need to go into "releasemode 1", which expects system.xvc. But that's for games when you're no longer modifying any code. Not something you do until you're sending your game to other people!
Weird cases: make sure system.vc has read permissions for all, and that if you're running from a shortcut, you properly initialize the working directory in the properties.
Posted on 2009-03-16 11:54:27 (last edited on 2009-03-16 11:57:13)
|
Goldengamer111
|
I have no idea what happened, but I have returned to the project after a day or so of not working on it, and it works perfectly! I have a few more questions, though.
First, is there any way to get the current X and Y position of the screen, for use in changing the position? I am thinking of something like this: WindowSetPosition(gamewindow, window.x[gamewindow]-40, window.y[gamewindow]-32);
Second, I want a wander-rectangle-like movement for some of my characters, but, as I have seen someone say somewhere else, they move, stop, immediately turn to face their next direction, wait a second, and then repeat their process. Not only do I not want them to turn immediately, but their walking animations start with a frame other than their standing animation, making them look really bad, and I want them to wait a random amount of time between movements. I was planning to write some custom code to deal with this, but I was wondering if anyone had any pointers.
Posted on 2009-03-16 20:12:44
|
Goldengamer111
|
I am having problems with my code. I have #defined E_PROF to be 2, the index of my professor entity, and am calling it in lines resembling those below. entity.x[E_PROF] = 6*16;
entity.y[E_PROF] = 9*16+6;
entity.speed[E_PROF] = 100; This code is returning an error: "Could not resolve identifier ']'!" I have done a similar thing with some of my other characters, E_GIRL (0) and E_MAN (1), and E_GIRL appears before E_PROF in my code, but I am not getting any errors with her.
Looking in the v3.txt file, the line directly above the line declaring the exit stats that "warning: 'E_PROF' : macro redefinition". Could that be because I have already defined "E_PROF" in another map? Shouldn't they be reset when the map switches?
EDIT: I just want to make it clear: the lines above are example lines. Every line with an "E_PROF" is giving my the error, even if it is something like "EntityMove(E_PROF, "r16f0");", though in that line it complains about the comma.
Posted on 2009-03-21 11:22:02 (last edited on 2009-03-21 11:32:47)
|
Overkill
|
This probably means you have #define E_PROF 2; Instead of #define E_PROF 2
With defines, it just replaces the first thing with the second thing until the end of that line. It's a straight-up text substitution and it along with #include are two statements that don't use semicolons.
So it was replacing E_PROF with "2;" (without quotes) instead of "2" in your code which causes syntax errors a ton.
EDIT: Oh, and make sure you only put #defines in system.vc. Don't put them in the map scripts. That isn't even supposed to work. :(
EDIT 2: Though... that probably gets rid of your intended use for defines there. So your best bet is just use the numbers of the entities directly.
Or make yourself some helper functions:
int GetProfEnt()
{
return 2;
}
Then call that to get the entity number.
Posted on 2009-03-21 12:26:03 (last edited on 2009-03-21 12:33:16)
|
Goldengamer111
|
Quote: Originally posted by Overkill
Oh, and make sure you only put #defines in system.vc. Don't put them in the map scripts. That isn't even supposed to work. :( Okay. It seems as though it does work, however. A bug in the compiler (or wherever this bug would be), perhaps?
So your best bet is just use the numbers of the entities directly.
Or make yourself some helper functions:
int GetProfEnt()
{
return 2;
}
Then call that to get the entity number. Thanks, this should work. Also, not to repeat myself, but can I use something like "window.x" or "window.y" to get the position of the game window, and do you have any pointers for creating a custom wander code for my entities (details are a few posts up)?
Posted on 2009-03-21 13:24:16
|
resident
|
I think the variables are camera.x and camera.y, but you'll need to turn off cameratracking first, and I think you may need to do some manual bounds checking to make sure the camera doesn't go anyplace it can't.
http://verge-rpg.com/docs/view.php?libid=1§ion=36
Posted on 2009-03-22 22:07:21
|
Overkill
|
Resident: There are no camera.x, camera.y. But you're close!
Anyway, rifling through random documentation here.
To manipulate the camera viewport in the window, use xwin/ywin, and make sure cameratracking is 0. If you wanna follow a non-player entity, you can set cameratracking to 2 and set cameratracker to the ent to follow.
As far as the real window (as in with the frame and minimize/maximize/close buttons and whatnot) used by the game, you shouldn't really rely on that, as the windowing functions aren't exactly supported when you run your game outside of Windows. You've been warned. Anyway, you can read about it here: http://verge-rpg.com/docs/view.php?libid=1§ion=28
Posted on 2009-03-23 11:46:03
|
Displaying 1-20 of 29 total.
12
next
|
|