MAR2008a Bug Reports

evilsquirrel

New Adventurer
MSC Developer
RiP
Joined
Jan 2, 2006
Messages
2,905
Reaction score
0
Age
36
Location
middle of nowhere
evilsquirrel said:
Game stopping error:

Could not release P-buffer from render texture

AND

Could not bind P-buffer to render texture


restart fixed this issue, to let everybody know
 

replica

New Adventurer
Joined
Dec 20, 2006
Messages
152
Reaction score
0
bloodrose gives my server the "vertex node out of field" error
 

villager

New Adventurer
RiP
Joined
Nov 21, 2006
Messages
1,272
Reaction score
0
Age
35
I get that Error whenever I try to start my server :S
 

The Man In Black

Administrator
Staff member
Administrator
Moderator
RiP
Joined
Jul 9, 2006
Messages
6,904
Reaction score
71
Have you both updated your maps from Thothie's site? We really have to find out where these crap-maps are coming from >_<
 

replica

New Adventurer
Joined
Dec 20, 2006
Messages
152
Reaction score
0
villager said:
I get that Error whenever I try to start my server :S

open the file crashed.cfg in notepad and change the map to edana, thats what i do every time it happens.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
<sneaky>

Will have fix for vertex thing soon, but likely will involve downloading the patch... *again* :evil:
 

The Man In Black

Administrator
Staff member
Administrator
Moderator
RiP
Joined
Jul 9, 2006
Messages
6,904
Reaction score
71
So very sneaky, Thoth :roll:

You probably should have just IM'd me >_>
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
All three betapack links have been updated with a version that removes Vertex Node out of Field issues.
 

villager

New Adventurer
RiP
Joined
Nov 21, 2006
Messages
1,272
Reaction score
0
Age
35
I've mention this before and it's not really a bug but... what's up with all the new weapons from the Golden Axe up using hardly any stamina? I mean GIB, still being one of the better weapons looks the lightest of them all, but here I am, out of breath from swinging this thing for a half a minute, and I can use the Northmaul, Nova Blade, Hoarfrost Shard, Heavy Crossbow, Bludgeon Hammer and practically all of the giant axes for atleast 10 minutes straight until I run out of stamina.

Not complaining (Or atleast not trying to) but this stamina thing doesn't make sense if only the old weapons are effected, not the newer ones :S Stamina was always my restrictions to certain weapons.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Meh, prob just forgot to set the drain level on some. (Stands back and watches the community crucify Villager)

Might be best to go through all the weapons and even them all up proper. Some of the older weapons drain more than they should, so it seems.
 

subenji99

New Adventurer
Joined
Feb 20, 2008
Messages
97
Reaction score
0
I thought someone had already mentioned it, but cannot find mention, so:
Assuming an artifact chest is supposed to offer in the order of the damge points table, player with highest points down, If the first player cancels, ("Player refuses to partake in the bounty") the next player down is NOT offered the chest at all - it skips to the THIRD player in the list.
 

J-M v2.5.5

BANNED
BANNED
Joined
Feb 26, 2005
Messages
5,675
Reaction score
1
Age
35
Location
Nijmegen, the Netherlands.
Artifact chests randomly skip players, it isn't always the #2 who gets skipped.

Also, if a person is idling and gets the artifact chest, what happens when you kick him? I never actually got to test this, but about two days ago, some dude was idling when he got to pick from an artifact chest. The people in the server tried to kick him, but the server (replica's) didn't allow kickvoting.

Suggestion: whenever a player who gets an arty-pick gets kicked, the artifact chest randomly removes one item.

Good suggestion y/n?
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Actually what happens is that it vanishes, if he was the player to recieve an item when he was kicked. If not that, it'll simply lock on that player and not give any more items.

I recently added a bit where the Arti-Chest won't offer an item the player already has unless it has no other item to offer him. I've not tested this bit. As for the Arti-chest skipping players, I can't figure out where in the code this might be happening. If some would-be code master wishes to look at the script and try to figure it out, here it is:
Code:
//Black chest, the revenge
//- new string and token handling might simplify this mess, or so I thought
{
	const ANIM_IDLE idle
	const ANIM_CLOSE close
	const ANIM_OPEN open
	const LIGHT_COLOR (200,200,255)
	const LIGHT_RAD 96
}

{ game_spawn

	//spawn invisible

	hp 1
	invincible  2
	name ''
	width 20
	height 30
	setmodel	misc/treasure.mdl
	setmodelbody 0 1
	setidleanim	ANIM_IDLE

	setvard IMMUNE_PUSH 1
	setvard PLAYING_DEAD 1
	fly 1
	gravity 0

	setsolid none

	setprop ent_me rendermode 5
	setprop ent_me renderamt 0
}

{ game_dynamically_created //<token_items> <token_chances> <token_req_players> <token_disp_names>

	setvard IBC_ITEM_LIST PARAM1
	setvard IBC_ITEM_CHANCES PARAM2
	setvard IBC_REQ_PLAYERS PARAM3
	setvard IBC_ITEM_NAMES PARAM4

	if ( IBC_ITEM_LIST startswith 'PARAM' ) infomsg all "THOTH FUCKED UP (Artifact Chest)" "Dude, artifact this chest has no items!"
	if ( IBC_ITEM_CHANCES startswith 'PARAM' ) infomsg all "THOTH FUCKED UP (Artifact Chest)" "Artifact this chest no spawn chances!"
	if ( IBC_REQ_PLAYERS startswith 'PARAM' ) infomsg all "THOTH FUCKED UP (Artifact Chest)" "Artifact this chest no req players!"
	if ( IBC_ITEM_NAMES startswith 'PARAM' ) infomsg all "THOTH FUCKED UP (Artifact Chest)" "Artifact chest items have no names!"

	if ( PARAM8 isnot 'PARAM8' ) setvard FACE_YAW $vec.yaw(PARAM8) //compatiblity

	setvard ARTIFIACT_DEBUG "ARTIFACT_CHEST ("
	stradd ARTIFIACT_DEBUG game.map.name
	stradd ARTIFIACT_DEBUG "):"

	if ( game.cvar.ms_chatlog ) chatlog $timestamp(>) ARTIFIACT_DEBUG full_inventory: IBC_ITEM_NAMES req_players: IBC_REQ_PLAYERS spawn_chances: IBC_ITEM_CHANCES

	getplayersnb PLAYER_LIST
	setvard N_PLAYERS $get_token_amt(PLAYER_LIST)
	callevent 0.1 filter_items

	if G_DEVELOPER_MODE
	setvard DEV_PLAYER ''
	getplayer DEV_PLAYER 1
	consolemsg DEV_PLAYER ARTY_DEBUG: ARTIFIACT_DEBUG full_inventory:
	consolemsg DEV_PLAYER ARTY_DEBUG: - items: IBC_ITEM_LIST
	consolemsg DEV_PLAYER ARTY_DEBUG: - names: IBC_ITEM_NAMES
	consolemsg DEV_PLAYER ARTY_DEBUG: - players: IBC_REQ_PLAYERS
	consolemsg DEV_PLAYER ARTY_DEBUG: - chances: IBC_ITEM_CHANCES
}

{ filter_items

	if ( FACE_YAW isnot 'FACE_YAW' ) setangle face $vec(0,FACE_YAW,0)

	//remove items that fail spawn chances, or there are not enough players for
	setvard REMOVE_ITEMS ''
	calleventloop $get_token_amt(IBC_ITEM_LIST) filter_items_loop
	if ( $get_token_amt(REMOVE_ITEMS) == $get_token_amt(IBC_ITEM_LIST) )
	{
		if ( game.cvar.ms_chatlog ) chatlog $timestamp(>) ARTIFIACT_DEBUG Removed: all items failed spawn chance rolls.
		deleteent ent_me //got nadda
		local EXIT_SUB 1
	}
	if !EXIT_SUB

	callevent 0.1 remove_items //give a sec for strings to propigate
}

{ filter_items_loop

	local CUR_IDX game.script.iteration
	local CUR_ITEM_REQ_PLAYERS $get_token(IBC_REQ_PLAYERS,CUR_IDX)
	if ( N_PLAYERS < CUR_ITEM_REQ_PLAYERS )
	{
		local REMOVE_ITEM 1
		if G_DEVELOPER_MODE
		consolemsg DEV_PLAYER ARTY_DEBUG: CUR_IDX ( $get_token(IBC_ITEM_LIST,CUR_IDX) ) marked for removal (player req)
	}

	local CUR_ITEM_SPAWNCHANCE $get_token(IBC_ITEM_CHANCES,CUR_IDX)
	multiply CUR_ITEM_SPAWNCHANCE N_PLAYERS
	if ( $rand(1,100) > CUR_ITEM_SPAWNCHANCE )
	{
		local REMOVE_ITEM 1
		if G_DEVELOPER_MODE
		consolemsg DEV_PLAYER ARTY_DEBUG: CUR_IDX ( $get_token(IBC_ITEM_LIST,CUR_IDX) ) marked for removal (spawn chance)
	}

	if REMOVE_ITEM
	token.add REMOVE_ITEMS $get_token(IBC_ITEM_LIST,CUR_IDX)
}

{ remove_items

	if ( G_DEVELOPER_MODE ) consolemsg DEV_PLAYER ARTY_DEBUG: Remove_item_list: REMOVE_ITEMS

	calleventloop $get_token_amt(REMOVE_ITEMS) remove_items_loop
	if ( game.cvar.ms_chatlog ) chatlog $timestamp(>) ARTIFIACT_DEBUG final_inventory: IBC_ITEM_NAMES req_players: IBC_REQ_PLAYERS spawn_chances: IBC_ITEM_CHANCES
	if ( G_DEVELOPER_MODE )
	{
		consolemsg DEV_PLAYER ARTY_DEBUG: ARTIFIACT_DEBUG final_inventory:
		consolemsg DEV_PLAYER ARTY_DEBUG: - items: IBC_ITEM_NAMES
		consolemsg DEV_PLAYER ARTY_DEBUG: - players: IBC_REQ_PLAYERS
		consolemsg DEV_PLAYER ARTY_DEBUG: - chances: IBC_ITEM_CHANCES
	}

	callevent 0.5 choose_player
}

{ remove_items_loop

	local CUR_IDX game.script.iteration
	local ITEM_TO_REMOVE $get_token(REMOVE_ITEMS,CUR_IDX)
	local REMOVE_IDX $get_find_token(IBC_ITEM_LIST,ITEM_TO_REMOVE) 

	if ( G_DEVELOPER_MODE )	consolemsg DEV_PLAYER ARTY_DEBUG: Removing ( $get_token(IBC_ITEM_LIST,REMOVE_IDX) )

	//doing this from here, rather than callevent remove_item, to be safer
	token.del IBC_ITEM_LIST REMOVE_IDX
	token.del IBC_ITEM_CHANCES REMOVE_IDX
	token.del IBC_REQ_PLAYERS REMOVE_IDX
	token.del IBC_ITEM_NAMES REMOVE_IDX
}

{ choose_player

	setvard STRONGEST_IDX 0
	setvard STRONGEST_STAT_LEVEL 0
	calleventloop $get_token_amt(PLAYER_LIST) find_strongest_player
	setvard THE_CHOSEN_ONE $get_token(PLAYER_LIST,STRONGEST_IDX)
	setvard THE_CHOSEN_ONE_IDX STRONGEST_IDX
	token.del PLAYER_LIST STRONGEST_IDX
	callevent inform_player
}

{ find_strongest_player

	local CUR_IDX game.script.iteration
	local CUR_PLAYER $get_token(PLAYER_LIST,CUR_IDX)
	local PLAYER_STAT $get(CUR_PLAYER,scriptvar,PLR_TOTAL_DMG) //newfunc in player_main/game_master +1000 for heal/iceshield -1000 for death
	local PLAYER_SUB_STAT $get(CUR_PLAYER,scriptvar,PLR_DMG) //fraction points
	multiply PLAYER_SUB_STAT 0.001
	add PLAYER_STAT PLAYER_SUB_STAT
	if ( G_DEVELOPER_MODE ) consolemsg DEV_PLAYER ARTY_DEBUG: reading PLAYER_STAT dmgpoints on $get(CUR_PLAYER,name)
	if ( PLAYER_STAT > STRONGEST_STAT_LEVEL )
	{
		setvard STRONGEST_STAT_LEVEL PLAYER_STAT
		setvard STRONGEST_IDX CUR_IDX
	}
}

{ inform_player

	if ( !I_MANIFESTED )
	{
		//I have items, manifest
		name Artifact Chest
		playsound 0 10 magic/spawn.wav
		setvard I_MANIFESTED 1
		clientevent persist all monsters/lighted_cl $get(ent_me,index) LIGHT_COLOR LIGHT_RAD
		setvard MY_LIGHT_IDX game.script.last_sent_id
		callexternal GAME_MASTER gm_fade_in $get(ent_me,id) 5
	}
	infomsg THE_CHOSEN_ONE "ARTIFACT CHEST: YOU HAVE BEEN CHOSEN!" "Select and item of your choosing..."
	playanim hold ANIM_OPEN
	menu.open THE_CHOSEN_ONE
	callevent 10.0 resend_menu
}

{ game_menu_getoptions

	setvard CUR_USER PARAM1
	setvard LAST_SKIPPED_ITEM -1
	setvard LOOP_ITEMS_OFFERED 0
	calleventloop $get_token_amt(IBC_ITEM_LIST) list_items

	//player already has every item we offered
	//offer him a duplicate anyways (ie. the last item skipped)
	if LOOP_ITEMS_OFFERED == 0
	local reg.mitem.title 	$get_token(IBC_ITEM_NAMES,LAST_SKIPPED_ITEM)
	local reg.mitem.type 	callback
	local reg.mitem.data LAST_SKIPPED_ITEM
	local reg.mitem.callback give_item
	menuitem.register
}

{ list_items

	local CUR_IDX game.script.iteration
	local CUR_ITEM_NAME $get_token(IBC_ITEM_NAMES,CUR_IDX)

	local CUR_ITEM $get_token(IBC_ITEM_LIST,CUR_IDX)

	//user already has item, skip it
	if ( $item_exists(CUR_USER,CUR_ITEM) )
	{
		local SKIP_ITEM 1
		setvard LAST_SKIPPED_ITEM CUR_IDX
	}
	else
	{
		add LOOP_ITEMS_OFFERED 1
	}
	if !SKIP_ITEM

	local reg.mitem.title 	CUR_ITEM_NAME
	local reg.mitem.type 	callback
	local reg.mitem.data CUR_IDX
	local reg.mitem.callback give_item
	menuitem.register
}

{ game_menu_cancel

	//player clicked cancel on the pop-up menu
	callexternal THE_CHOSEN_ONE ext_last_artie_used $get(ent_me,id) //mark owner has having used me
	local RESP_STRING $get(PARAM1,name)
	strconc RESP_STRING " " has declined to partake in the bounty
	infomsg all "ARTIFACT CHEST" RESP_STRING
	playanim once ANIM_CLOSE
	token.del PLAYER_LIST THE_CHOSEN_ONE_IDX //remove player from list - oops, handled when we choose next winner
	callevent 2.0 next_winner
}

{ give_item //<prize_winner> <item_idx>

	callexternal PARAM1 ext_last_artie_used $get(ent_me,id) //mark owner has having used me
	if ( G_DEVELOPER_MODE )	consolemsg DEV_PLAYER ARTY_DEBUG: Menu Select PARAM2

	local CUR_ITEM $get_token(IBC_ITEM_LIST,PARAM2)
	local CUR_ITEM_NAME $get_token(IBC_ITEM_NAMES,PARAM2)
	offer PARAM1 CUR_ITEM
	local RESP_STRING $get(PARAM1,name)
	strconc RESP_STRING " " has recieved CUR_ITEM_NAME from an Artifact Chest. (NO ROLLING!)
	infomsg all "ARTIFACT CHEST" RESP_STRING

	if ( game.cvar.ms_chatlog ) chatlog $timestamp(>) ARTIFIACT_DEBUG $get(PARAM1,name) chose CUR_ITEM_NAME

	local ITEM_IDX PARAM2
	callevent remove_item ITEM_IDX

	token.del PLAYER_LIST THE_CHOSEN_ONE_IDX //remove player from list
	playanim once ANIM_CLOSE
	callevent 2.0 next_winner
}

{ next_winner

	if ( $get_token_amt(IBC_ITEM_LIST) == 0 )
	{
		callevent fade_away //out of stuff
		local ALL_DONE 1
	}
	if ( $get_token_amt(PLAYER_LIST) == 0 )
	{
		callevent fade_away //out of players
		local ALL_DONE 1
	}

	if !ALL_DONE
	callevent 1.0 choose_player
}

{ remove_item //<item_idx>
	token.del IBC_ITEM_LIST PARAM1
	token.del IBC_ITEM_CHANCES PARAM1
	token.del IBC_REQ_PLAYERS PARAM1
	token.del IBC_ITEM_NAMES PARAM1
}

{ fade_away

	//passed out everything I had, or ran out of players to pass stuff to, fade out
	playsound 0 10 magic/spawn.wav
	clientevent remove all MY_LIGHT_IDX
	callexternal GAME_MASTER gm_fade_out $get(ent_me,id)
	callevent 3.0 fade_away2
}

{ fade_away2

	deleteent ent_me
}

{ resend_menu
	if $get(THE_CHOSEN_ONE,isplayer) //still here
	if $get(THE_CHOSEN_ONE,scriptvar,PLR_LAST_ARTIE) isnot $get(ent_me,id) //hasnt used me yet
	//send menu again
	menu.open THE_CHOSEN_ONE
	callevent 10.0 resend_menu
}
 

subenji99

New Adventurer
Joined
Feb 20, 2008
Messages
97
Reaction score
0
I don't claim to know anything about this code, but I agree - the way it's set up in choose_player, find_strongest_player to iterate through all players, finding them in order - and the way it's set to remove players from the list in game_menu_cancel and give_item (but not set in next_winner) looks perfectly fine. So maybe the problem is at "game_dynamically_created" - i'm assuming PLAYER_LIST is generated by the line "getplayersnb PLAYER_LIST" after loot chances are done, and I assume this code is run as the chest spawns.

I have no idea how getplayersnb works, but as everything else looks error-free, maybe the problem could lie there. Admitted this is a shot in the dark.
 

Thraxis

New Adventurer
MSC Developer
RiP
Joined
Apr 30, 2007
Messages
530
Reaction score
0
Age
35
Location
Riverside, New Jersey
After looking the player selection parts over twice, it looks clean to me.

Perhaps running it a different way, even though it might be a little more instensive. Example off the top of my head would be to take list of Points when it's first called

So

Ted (a) = 100
Bob (b)= 80
Sally (c) = 60

Then having if certain letter > all other letters, then call item list. Then roll a continuous > from there (a bit of a wonky Idea, I know, but to put simply i'm not in the right state of mind for this right now) if possible. Something of the sort could work (under my knowledge) and be generally more bug proof (maybe) from these kinds of things happening.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Getplayersnb is a pretty straight forward bit that gathers players, skipping bots. It’s pretty simple process, and if it didn’t work, a whole lot of other things would break down.

game_dynamically_created is the event called when the chest is spawned, the parameters are passed from the parent that created it there (items, names, etc.)

Not sure what Thraxis is on about, but it sounds like the sort it uses now. It just parses through and says if > - it doesn’t do a bubble sort or nuttin complex.

So yeah, I be confused too.
 

subenji99

New Adventurer
Joined
Feb 20, 2008
Messages
97
Reaction score
0
Aha!
getplayersnb = "get players not bots"!
Your naming conventions are nice and easy to follow :)

Ok, as code seems fine, let's move on to theory. You're Iterating the "find_strongest_player" over and over again, every time someone has finished with the arti chest. I dunno if this scripting language can take tables or arrays, so pulling it off may be a challenge - but one piece of coding theory I stick to is: run functions as few times as possible in your code.

So I'd say create the list of players from strongest to weakest first, saved in a table or array (because of listpoints, you may already have such a table, if it's global) and just get the code to loop through every entry in that table in order from top to bottom - instead of running functions to loop though every player, recording their ID if their damage points are higher than any before until out of players - every time a new player is selected for the chest.

That would have the added effect of not offering the chest to people that joined after the chest had already spawned - which seems a good thing to me, though I doubt it does anyway as it is.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
We don't have real arrays in the script system, we have token arrays, prased by semi-colons. Hence these kinda awkward loop calls to find the highest scoring player.

For instance, a token list of BC_ITEM_NAMES names might be: "a Litch Tongue;a Potion of Warmth;an Ice Blade;" - those tokens would be numbered 0;1;2 via $get_token(BC_ITEM_NAMES,x)... Although to confuz0rz things, $get_token_amt(BC_ITEM_NAMES) enumerates from 1 and thus returns 3, leading to common mistakes, but I don't see any such here.

So, in the case of finding the highest scoring player, all it is doing is running through the token array generate by "getplayersnb", pulling the two scriptvars that track their damage for each player in said array (needed 2 because of the huge numbers and lack of float precision [2 places within the scripts, on returns]). It then stores the strongest player in THE_CHOSEN_ONE and doesn’t remove his token until…

…oh dear…

I think I see it there, yeah. It’s removing the token after it finds it, rather than waiting until finding out what “THE_CHOSEN_ONE” does. Bloody hell… I hate how you can squint at code 10,000 times and it still takes another pair of eyes to force you to find an obvious issue.

Hopefully commenting out "token.del PLAYER_LIST STRONGEST_IDX" on line #150 will fix it without generating issues. :oops:
 

The Man In Black

Administrator
Staff member
Administrator
Moderator
RiP
Joined
Jul 9, 2006
Messages
6,904
Reaction score
71
but one piece of coding theory I stick to is: run functions as few times as possible in your code.


NO!!!!

That is not coding theory, and in fact, goes against the basis of of OOP entirely! >_<;;;;
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
1) Is a known issue. Sometimes the server and client get out of sync when you level.

2) Maybe the player who was doing the quest disconnected?
 

subenji99

New Adventurer
Joined
Feb 20, 2008
Messages
97
Reaction score
0
Well in my experiences i've learned to only call on functions once, putting the data into a variable, then work with those variables as it's easier on CPU cycles. However, i've no experience in OOP.

At least my simpleton, incorrect view on the code actually helped thothie possibly find the cause of the bug.
 
Top