Latest revision bugs
Moderator: Developers
- Zefz
- Squirrel Knight (Administrator)
- Posts: 3820
- Joined: Wed Jul 23, 2008 1:27 am
- Location: Norway
- Contact:
No luck. The random number lists seem properly generated (RANDIE).
I did some more testing where I made a script give a randomized number output every 25 ticks. (rand % 100)
The number seemed properly random generated at first try:
17
70
81
30
12
19
In the next test I made the script generate 4 random numbers upon spawn:
31
50
60
34
I now tried to restart the module with both script snippets (first 4 generated on spawn then one continuously generated every 25 ticks). I got the same random results every time I restarted the module (which was 4 times).
[edit]I tried using the AND to randomize numbers as well (rand & 100). 4 numbers were generated upon IfSpawned. I got this result:
36
100
64
36
4
The result was same every time I restarted the module.[/edit]
I did some more testing where I made a script give a randomized number output every 25 ticks. (rand % 100)
The number seemed properly random generated at first try:
17
70
81
30
12
19
In the next test I made the script generate 4 random numbers upon spawn:
31
50
60
34
I now tried to restart the module with both script snippets (first 4 generated on spawn then one continuously generated every 25 ticks). I got the same random results every time I restarted the module (which was 4 times).
[edit]I tried using the AND to randomize numbers as well (rand & 100). 4 numbers were generated upon IfSpawned. I got this result:
36
100
64
36
4
The result was same every time I restarted the module.[/edit]
-
- {]-[0{0|307 (Developer)
- Posts: 1864
- Joined: Wed Jul 23, 2008 4:22 am
- Location: Minnesota, USA
Yes, well, the srand stuff is all just about the rand() function calls in C!
To re-randomize the rand calls in the script, we need to say something like
in module_start()...
To re-randomize the rand calls in the script, we need to say something like
Code: Select all
srand( pinst->seed );
pinst->randsave = rand();
randindex = rand()& MAXRAND;
in module_start()...
-
- {]-[0{0|307 (Developer)
- Posts: 1864
- Joined: Wed Jul 23, 2008 4:22 am
- Location: Minnesota, USA
I made a couple of changes to your book pricing code:
Code: Select all
// Make sure spell books take all their shop properties
// from their spell and not their book itself
if( SPELLBOOK == pchr->model )
{
if( SPELLBOOK == pchr->basemodel )
{
// this is definitely a book
// handle it normally
icap = pchr->model;
skin = pchr->skin;
}
else if( VALID_CAP(pchr->ai.content) )
{
// a normal spellbook?
// take the values from the spell info
icap = pchr->ai.content;
skin = pchr->money % MAXSKIN;
}
else if( VALID_CAP(pchr->basemodel) )
{
// this is an object of some kind that was transformed into a book?
// take the values from the basemodel.
icap = pchr->basemodel;
skin = pchr->skin;
}
else
{
// this is some kind of corrupted object that is now stuck as a book?
// take the values from the book model.
icap = pchr->model;
skin = pchr->skin;
}
}
else
{
// this is not a book at all
icap = pchr->model;
skin = pchr->skin;
}
price = CapList[icap].skincost[skin];
- Zefz
- Squirrel Knight (Administrator)
- Posts: 3820
- Joined: Wed Jul 23, 2008 1:27 am
- Location: Norway
- Contact:
Nice. I noticed there were some issues around the game where only skin 0 has the proper value and the other three skins had a value of 0 (since Egoboo only used the first skin to calculate price before). I think I fixed most of them, but there are probably more (we'll just have to find them and fix em).
You will notice you get a strange random message if you try to sell a item like that in a shop. (Maybe the "worthless item message" isn't working properly anymore?)
You will notice you get a strange random message if you try to sell a item like that in a shop. (Maybe the "worthless item message" isn't working properly anymore?)
- Zefz
- Squirrel Knight (Administrator)
- Posts: 3820
- Joined: Wed Jul 23, 2008 1:27 am
- Location: Norway
- Contact:
Messages are handled through the selfcounter that is set through the shop order. Buying and selling is handled by setting selforder (the price) and selfcounter (buy, sell, not enough, steal or worthless). My guess is that the Worthless "order" is not coming through properly (instead sending it's actual order count causing a very different message to be sent).
The script states
tmpargument = 5 + selfcounter
5 because that's the shop messages start in that particular message.txt, which in this case means
message 5 is buy
message 6 is sell
message 7 is not enough
message 8 is worthless item
Other bugs I noticed:
- Torches are still difficult to light. I had to jump on top of a brazier and drop the torch in the middle to get it to flame. Not very intuitive.
- I noticed that the naming for my saved characters would get messed up. I have a Healer, Viking and Wizard in my player list. For some reason all players end with the same three letters as my wizard (in this case "er"):
Adventurer
Eriker
Annigaler
I do not know if this affects only the name displayed in the menu or actual character exporting to a new folder.
- Characters that can jump more than one time reset their jump count before landing.
- Animated tiles on the mesh don't work (see first room in Ash Palace for example where the tiles break). I noticed the animated tile in the Healer starter did work, so this is maybe something wrong with the script function BreakTilesInPassage or something like that?
- The gong sound doesn't play anymore. Maybe IfCleanedUp isn't properly triggered or the camera moves away from the sound origin too fast to be heard?
The script states
tmpargument = 5 + selfcounter
5 because that's the shop messages start in that particular message.txt, which in this case means
message 5 is buy
message 6 is sell
message 7 is not enough
message 8 is worthless item
Other bugs I noticed:
- Torches are still difficult to light. I had to jump on top of a brazier and drop the torch in the middle to get it to flame. Not very intuitive.
- I noticed that the naming for my saved characters would get messed up. I have a Healer, Viking and Wizard in my player list. For some reason all players end with the same three letters as my wizard (in this case "er"):
Adventurer
Eriker
Annigaler
I do not know if this affects only the name displayed in the menu or actual character exporting to a new folder.
- Characters that can jump more than one time reset their jump count before landing.
- Animated tiles on the mesh don't work (see first room in Ash Palace for example where the tiles break). I noticed the animated tile in the Healer starter did work, so this is maybe something wrong with the script function BreakTilesInPassage or something like that?
- The gong sound doesn't play anymore. Maybe IfCleanedUp isn't properly triggered or the camera moves away from the sound origin too fast to be heard?
- penguinflyer2222
- Queen Penguin (Senior Member)
- Posts: 6614
- Joined: Wed Jul 23, 2008 1:51 am
Zefz wrote:- Torches are still difficult to light. I had to jump on top of a brazier and drop the torch in the middle to get it to flame. Not very intuitive.
I tried to light one from a sandweg shop from the flames that appeared when I blew up the shopkeeper (lol) and couldn't get it to work, although I'm not sure if that would normally work anyway.
Zefz wrote:- I noticed that the naming for my saved characters would get messed up. I have a Healer, Viking and Wizard in my player list. For some reason all players end with the same three letters as my wizard (in this case "er"):
Adventurer
Eriker
Annigaler
Got this bug too.. sometimes the characters' names would end in "ad" from Pupkinhead.
Zefz wrote:I do not know if this affects only the name displayed in the menu or actual character exporting to a new folder.
I know that it doesn't affect the folder's name, at least.
......
- Zefz
- Squirrel Knight (Administrator)
- Posts: 3820
- Joined: Wed Jul 23, 2008 1:27 am
- Location: Norway
- Contact:
- I fixed the strange name error.
- Fixed the gong sound missing.
- Also fixed the shop message bug!
I found out what caused the tiles not to break when stepped upon. Every function that changes tiles (SetTileXY, BreakTilePassage, etc.) which simply changes
to a different texture number does not work correctly.
It changes into the wrong texture number for some reason. The door texture for the Archmage trials changes into a different texture than it is supposed to, meteors in Fire Domain no longer make an impact crater and of course tiles that break don't break at all. Any ideas?
- Fixed the gong sound missing.
- Also fixed the shop message bug!
I found out what caused the tiles not to break when stepped upon. Every function that changes tiles (SetTileXY, BreakTilePassage, etc.) which simply changes
Code: Select all
PMesh->mmem.tile_list[cnt].img
to a different texture number does not work correctly.
It changes into the wrong texture number for some reason. The door texture for the Archmage trials changes into a different texture than it is supposed to, meteors in Fire Domain no longer make an impact crater and of course tiles that break don't break at all. Any ideas?
-
- {]-[0{0|307 (Developer)
- Posts: 1864
- Joined: Wed Jul 23, 2008 4:22 am
- Location: Minnesota, USA
I haven't looked to see what is happening. Is the tile turning black, disappearing, or not changing at all?
You certainly have to make sure that the value for the tile is less than 255 of there will be trouble. The img field must be working pretty much as before or rendering the mesh would not work properly.
It may be that there is an error in the function that is supposed to change the tile image. It might be rejecting valid tiles instead of allowing them. Check for the proper use of the macro VALID_TILE() in that function.
You certainly have to make sure that the value for the tile is less than 255 of there will be trouble. The img field must be working pretty much as before or rendering the mesh would not work properly.
It may be that there is an error in the function that is supposed to change the tile image. It might be rejecting valid tiles instead of allowing them. Check for the proper use of the macro VALID_TILE() in that function.
- Zefz
- Squirrel Knight (Administrator)
- Posts: 3820
- Joined: Wed Jul 23, 2008 1:27 am
- Location: Norway
- Contact:
Yeah, the texture type is valid and the tile is valid. The breaking tiles in Ash Palace and the craters from meteors in the Fire Domain seem not to change at all.
While the tile in Bishopia changes to a wrong tile (some part of a ship). It is probably worth to note that the tile in Bishopia is a Big tile (made up from 4 smaller tiles).
[edit]I fixed the unlimited jumping bug as well. Only one left is the one mentioned above I think.[/edit]
While the tile in Bishopia changes to a wrong tile (some part of a ship). It is probably worth to note that the tile in Bishopia is a Big tile (made up from 4 smaller tiles).
[edit]I fixed the unlimited jumping bug as well. Only one left is the one mentioned above I think.[/edit]