It is currently Sun Oct 25, 2020 1:26 am

All times are UTC

Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Variable problem
PostPosted: Sun Sep 26, 2010 9:56 pm 
User avatar

Joined: Sat Jul 04, 2009 8:52 pm
Posts: 25
I've replaced the main menu bg with a 3d scene.


I saw the text that appears before you select a character (skills, position...) and I had and idea. Rendering the character with the equipment before entering game would be nice. So I did it.

function MainMenu_CharList_DrawCharacter ()
    local chardata = GetCharFileData(user,0)
    if (chardata) then

        local maxlayers = 24
        local layers = 1
        local arr = {}
        for layers = 1, maxlayers do
            if (chardata.equip[layers]) then
                local tiledata = GetStaticTileType(chardata.equip[layers].artid)
                local modelid = tiledata.miAnimID
                table.insert(arr,(string.format("{artid=%s,animid=%s,hue=%s}", chardata.equip[layers].artid, modelid, chardata.equip[layers].hue)))
        local charequip = table.concat(arr,",")
        print ("GetCharEquip", charequip)

When I click on a shard to login with and account (to go to the character selection menu) the client crashes. I'm a noob programming so it's normal. But if I replace the "charequip" variable on the "MainMenuShowModel" function with the print output it works.

$ irisuo
Pulseaudio detected
/usr/share/games/ultimaonline/iris/bin /usr/share/games/ultimaonline/iris
probing: ../lua/main.lua
probing: ../lugre/lua/
lua main file: ../lua/main.lua
lua lugre dir: ../lugre/lua/
main working dir: ../
MainWorkingDir    ../
lugreluapath    ../lugre/lua/
LoadShardList    /home/josem/.iris/config/shards/    .xml
LoadShardList    Localhost    /home/josem/.iris/config/shards/Localhost.xml    .xml
gGraphicProfile     high
Setting Graphicprofile: ../lua/profiles/gfx_high.lua
uo protocol version used by iris    6092
Lua version : 5.1
Ogre platform : linux
loading plugin     ../plugins/example.lua
loading plugin     ../plugins/hudenemylist.lua
loading plugin     ../plugins/itemcounter.lua
loading plugin     ../plugins/lib.spellbar.lua
loading plugin     ../plugins/loot.lua
loading plugin     ../plugins/minergrid.lua
loading plugin     ../plugins/moblist.lua
warning, ImportRazorProfile file not found    C:/Program Files/Razor/Profiles/default.xml
initializing ogre...
### GfxConfig_Apply...
>>>gGfxConfig_RenderSystem    >nil<
>>>gGfxConfig_Resolution    >nil<
>>>gGfxConfig_Fullscreen    >nil<
>>>gGfxConfig_AntiAliasing    >4<
GfxConfig_FindDefaultRenderSystem    OpenGL Rendering Subsystem    bPreferOpenGL:    true
GfxConfig_FindDefaultResolution    1024 x  768
>>>gGfxConfig_RenderSystem    >OpenGL Rendering Subsystem<
>>>gGfxConfig_Resolution    >1024 x  768<
>>>gGfxConfig_Fullscreen    >false<
>>>gGfxConfig_AntiAliasing    >4<
GfxConfig_SetOgreConfig: value set    >FSAA<    >4<
GfxConfig_SetOgreConfig: value set    >Full Screen<    >No<
GfxConfig_SetOgreConfig: value set    >Video Mode<    >1024 x  768<
GetOgreVersion    0x10604    .ogre1.6
OgreInitResLocs done
initializing ogre done
cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/unifont.mul) : 1.4 MB
cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/unifont1.mul) : 1.4 MB
cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/unifont2.mul) : 1.4 MB
cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/unifont3.mul) : 2.5 MB
cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/unifont4.mul) : 3.9 MB
cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/unifont5.mul) : 2.2 MB
cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/unifont6.mul) : 3.3 MB
cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/tiledata.mul) : 1.6 MB
cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/texmaps.mul) : 28.1 MB

gGuiSystem2Ok    true
cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/anim.idx) : 1.7 MB
cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/anim3.idx) : 1.5 MB
cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/animdata.mul) : 2.1 MB
cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/art.mul) : 63.7 MB
cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/gumpart.mul) : 52.2 MB
strShadowTechnique = texture_additive
setShadowFarDistance = 120
gTileFreeWalk:UpdateGroundCache : warning, no maploader(yet)
GrannyTest3DData:ok    {animid=0,scalex=1.600000,bodyid=400=0x0190,modelname="h_male",defhue="FFFFFFFF",scalez=1.500000,scaley=1.400000,hand=0,typeid=3,}
ERROR LoadGrannyAnim    /home/fakeroot/usr/share/games/ultimaonline/Models/Animals/CuShidhe_Eat.grn    277    3    table: 0xa4909b0    table: 0xa490ae0
ERROR LoadGrannyAnim    /home/fakeroot/usr/share/games/ultimaonline/Models/Animals/CuShidhe_GetHit.grn    277    7    table: 0xa4909b0    table: 0xa490ae0
submesh mat    0    mainmenu    1
PingStep NextTimeUpdateDetected t/next    11399    0
GetCharFileData    josemdark    0    0    /home/josem/.iris/config/chars/
GetCharFileShortInfo    josemdark    0    table: 0xd0b55c0
GetCharFileData    josemdark    1    0    /home/josem/.iris/config/chars/
GetCharFileShortInfo    josemdark    1    table: 0xd0dc010
  520 msec mem:L=     501k O=       4k      3D:MousePick:MousePick_ShowHits   
1732 msec mem:L=     400k O=       0k      3D:MousePick:MousePick_ShowHits   
PingStep NextTimeUpdateDetected t/next    15737    76266
initializing packets for or later
############# + + ++ +++ + +++ + +gSubServerNamesByID    0    Eclipse
NET: server redirect: id=0x0000008c ip= port=2595 AccountNr.:0x070ba6c0

++++++ MainMenuShowCharList : recevived kPacket_Character_List 0xA9
GetCharFileData    nil    0    0    /home/josem/.iris/config/chars/
GetCharEquip    {artid=3834,animid=984,hue=1328},{artid=5901,animid=479,hue=1289},{artid=11115,animid=946,hue=0},{artid=7933,animid=435,hue=1450},{artid=5138,animid=563,hue=1364},{artid=5062,animid=545,hue=0},{artid=4234,animid=498,hue=1324},{artid=4232,animid=497,hue=1165},{artid=5435,animid=466,hue=193},{artid=7942,animid=508,hue=0},{artid=5441,animid=490,hue=1177},{artid=4231,animid=496,hue=0},{artid=5198,animid=556,hue=1109},{artid=12215,animid=896,hue=1261},{artid=3701,animid=422,hue=0},{artid=9860,animid=970,hue=578}
LuaErrorHandler start

LuaErrorHandler end
./ línea 6: 29045 Violación de segmento  ./iris $@


Any ideas?

PD: Is there a bugtracker or something to report bugs? The trac bugtracker can't be used by non-admin users.

 Post subject: Re: Variable problem
PostPosted: Thu Oct 07, 2010 11:40 am 
User avatar

Joined: Mon Aug 09, 2004 12:20 pm
Posts: 1431
Nice Idea. I like it :).

When you are finished, can you send us a patch for current svn/trunk?

please report bug in this forum. we disabled trac because of spam.

-> viewforum.php?f=18

About your problem, i think we have to debug this. No Idea yet. If you send us your patch we can test it.

 Post subject: Re: Variable problem
PostPosted: Thu Oct 07, 2010 7:45 pm 
User avatar

Joined: Sat Jul 04, 2009 8:52 pm
Posts: 25
Here are the patches. When the variable problem is solved I'll try to display all the characters on the account instead of one, and maybe add some different backgrounds with diferent models and randomnize them on client start.

lib.mainmenu.background.lua ( )
lib.mainmenu.charcreate.lua ( )
lib.mainmenu.charlist.lua ( )

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group