logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
XP Craft v0.2 released
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
Carter_DC



Joined: 25 Nov 2006
Posts: 23
Location: France

PostPosted: Tue Sep 04, 2007 21:16    Post subject: XP Craft v0.2 released Reply with quote

sorry for i got really little time to explain the whole thing..
but..
here it is :
http://nwvault.ign.com/View.php?view=NWN2Other.Detail&id=127

every thing is explained on the vault and more in the read me file.

that's still a proptotype though... and it only allows basic things.

you're much welcone to test and tell me if it seems ok.. and if i must go on with it.. .

if every thing fine with this version, i'll ask for my own page to explain my thing (and every thing), for i got some plans on the next step of this plugin..

(you may also vote for this contrib if you like Wink )
Back to top
View user's profile Send private message MSN Messenger
Urlord



Joined: 17 Nov 2006
Posts: 122

PostPosted: Wed Sep 05, 2007 1:24    Post subject: Reply with quote

Carter, You amaze me!

This will be a huge plugin once you and those helping you get the kinks worked out. I'm just getting excited about being able to set an item's cost or modifycost from the database. I can't even imagine being able to alter item appearances and colors dynamically.

I am so looking forward to seeing this mature.
_________________
Jim (aka, Urlord)
Visit the Persistent World of Nymri
Back to top
View user's profile Send private message Send e-mail
Carter_DC



Joined: 25 Nov 2006
Posts: 23
Location: France

PostPosted: Wed Sep 05, 2007 1:52    Post subject: Reply with quote

you can actually already use a modifycost in your scripts if you want..
the thing is i wouldn't go in a loop with this kinda things for it needs to create files in the bioware database and then get the items out and create them. it's kinda heavy...


i haven't tested it much though.
i don't even know the time it needs to perform a "craft"
that kinda info coul be helpfull. knowing the time it takes to get an item into the bioware database, the timeit takes to get or set a prop with the plugin and the timeit takes to get the item outta here and create it on the module..


As i've been asked, i'll write down some comments about the way it does the trick in the next few days. (but i also got a pw to develop)
Back to top
View user's profile Send private message MSN Messenger
nosfe



Joined: 25 Apr 2007
Posts: 22

PostPosted: Wed Sep 05, 2007 8:45    Post subject: Reply with quote

@Urlord

For the Cost of item, you can't modify this field into file of item because it is calculate dynamicly by the game, but the ModifyCost field into item it is modify possible Wink
Back to top
View user's profile Send private message
Lokey



Joined: 02 Jan 2005
Posts: 158

PostPosted: Wed Sep 05, 2007 9:03    Post subject: Reply with quote

Profile from last run of your test mod:
Code:
Current statistics
---------------------------------------------------------------------------
x2_mod_def_load                     0 msec      1 calls  |
i_EL_ESTHETIC_CRAFTER_ac            0 msec      1 calls  |
nw_g0_conversat                     1 msec      1 calls  |
x2_mod_def_unaqu                    0 msec      1 calls  |
NW_S3_ActItem01                     0 msec      1 calls  |
gui_nwnx_craft_ok                 841 msec      1 calls  |
nw_c2_default1                      0 msec     19 calls *|
d_nxcraft_setpropsroad              0 msec      1 calls  |
>i_EL_ESTHETIC_CRAFTER_ac           0 msec      2 calls  |
x2_mod_def_aqu                      0 msec     10 calls  |
x2_mod_def_equ                      0 msec      4 calls  |
x2_mod_def_act                      0 msec      1 calls  |
nw_c2_default2                      0 msec      2 calls  |
nw_c2_default9                      1 msec      1 calls  |
d_nxcraft_setvalue                  0 msec      1 calls  |
x2_mod_def_unequ                    0 msec      1 calls  |
---------------------------------------------------------------------------
Elapsed time                : 12176 msec
Runtime delta               : 0 msec
Total cumulative runtime    : 843 msec
Total number of scriptcalls : 48

I recall that it was pretty good on timings, or at least comparable to an NWNx2-LETO call... Will look at more.

Tried setting model parts, looked good. I'd definitely like to know some of the how that went into it: how are you reading/editting the default database and what are you using as a gff library?

So far, looks very nice!
_________________
Neversummer PW NWNx powered mayhem Wink
Back to top
View user's profile Send private message
Carter_DC



Joined: 25 Nov 2006
Posts: 23
Location: France

PostPosted: Wed Sep 05, 2007 12:02    Post subject: Reply with quote

yopsh !

Good thing you talk bout that, for i forgot to mention it in the read me file...
this plugin use a class by Edward T. Smith called CNwnHierarchy.
which offers structures that deals with gff elements hierarchy.

the rest is well hum.. nothing more but file access.

As a matter of facts i'm kind of a newbie in c++, for i did the plugin in 3 days but i spent one of them trying to understand how to input a single string into win32 console app (man the web is fairly poor bout such basic things).
Thank god I discovered the CString class lol and it changed my life.
Back to top
View user's profile Send private message MSN Messenger
brockfanning



Joined: 01 Sep 2007
Posts: 15

PostPosted: Sun Sep 09, 2007 9:44    Post subject: Reply with quote

Thank you for releasing this!!

We're using it to allow crafters to modify the appearance of weapons.

It is working, but took a lot of tweaking, because I got a lot of server crashes. I wish I could give you detailed bug reports, but I honestly couldn't find a definate reason for the crashes. I only have suspicions of what may have possibly caused the crashes:
1. Trying to do something to the oItem object after using XPCraft_SetItemProperty. (ie, after the old item has been replaced with a new one)
2. Having LOTS of local variables on the item (like 20+) and then using XPCraft_SetItemProperty.
3. Using XPCraft_GetItemProperty and then XPCraft_SetItemProperty in the same script without any delay.
4. Trying to use XPCraft_SetItemProperty on an item that I had tried previously and gotten a crash from. In other words, if I tried and got a crash while using XPCraft_SetItemProperty, it seemed like all future uses of XPCraft_SetItemProperty on that item would also give me a crash.

Another thing I noticed was that if I got a server crash, the database would not be destroyed.

Anyways, all of these things are simply suspicions, in the hopes it may help in a small way.

Thanks again for releasing this, on behalf of the team and players of our PW (The Known Lands).
Back to top
View user's profile Send private message
Carter_DC



Joined: 25 Nov 2006
Posts: 23
Location: France

PostPosted: Sun Sep 09, 2007 12:33    Post subject: Reply with quote

would it be possible that you lend me your scripts that use the set/get itemprops.. ?
for i've been testing those on weapon appearances without crashes...

knowing how you do your thing could possibly help in finding a solution.

an interesting info bout this would be to know if crashes occur while a single player is performing a craft, or if muliple player do, at the same time...

don't hesitate a grab me on msn, if you need to.

anyway, i'm gonna try the cases you talk about, to see if i get the same thing..



The fact is that the database files aren't destroyed if your server crashes, but it shouldn't be a prob for they would be replaced with new ones as soon as the same player performs an oter craft.
Back to top
View user's profile Send private message MSN Messenger
Carter_DC



Joined: 25 Nov 2006
Posts: 23
Location: France

PostPosted: Sun Sep 09, 2007 14:46    Post subject: Reply with quote

As a matter of facts, i'll certainly quit the plugin coding, for i'm far too busy with my pw, and mainly for i'm a terrible c++ coder...

but i still want to go on with the project itself for i got a good knowledge of how that shit works and a pretty good guess bout how to improve things.

So if you wanna go on with this thing, you may join me sometimes on msn in order to talk about it.
Back to top
View user's profile Send private message MSN Messenger
brockfanning



Joined: 01 Sep 2007
Posts: 15

PostPosted: Sun Sep 09, 2007 18:28    Post subject: Reply with quote

Well the script is actually working now, so that wouldn't be much help to you. Smile

But I'm going to keep messing with it, to try and recreate those crashes. And see if I can narrow down the problem. If I can get the crash happening again, I'll get you the script.

We've got weapons working, so next I'm going to try modfiying armor. Love this plugin! Very Happy
Back to top
View user's profile Send private message
Carter_DC



Joined: 25 Nov 2006
Posts: 23
Location: France

PostPosted: Sun Sep 09, 2007 21:52    Post subject: Reply with quote

Heavy tests have been doing on Syloan2 this afternoon, with 3/4 playrs crafting armors/weapons at the same time.

took them 45 min to get a server crash, but no clue if it's related to the plugin or what.
tests will go on untill knowing what happend...

but the fact is that the next version will be a little improved..
with spécific SetNext functions that won't allow one to mess with variation numbers on models
Back to top
View user's profile Send private message MSN Messenger
brockfanning



Joined: 01 Sep 2007
Posts: 15

PostPosted: Sun Sep 09, 2007 22:21    Post subject: Reply with quote

To modify armor, I assume you'd use the "Variation" path? Or does ModelPart1 etc. affect armor too?
Back to top
View user's profile Send private message
Carter_DC



Joined: 25 Nov 2006
Posts: 23
Location: France

PostPosted: Mon Sep 10, 2007 0:58    Post subject: Reply with quote

armor or clothes modifying come through Variation indeed, to iterrate through the models within a spécific material..

but you can also change the ArmorVisualType, witch stands for the Materail, (cloth, leather, studded leather, padded cloth, chain, plate etc... )

theses thigns also work on cloaks, boots, helmets, gloves and belt (forgot to test this one lol).
Back to top
View user's profile Send private message MSN Messenger
brockfanning



Joined: 01 Sep 2007
Posts: 15

PostPosted: Tue Sep 11, 2007 22:40    Post subject: Reply with quote

Great, got armor working as well. It's working like a charm. Smile Eventually I will go back and try to recreate the older scripts that were giving me crashes.

Just a random question:
1. Is it feasible to get/set strings? I'm just curious if it would be possible for you to also beat Obsidian to fixing SetDescription. Wink
Back to top
View user's profile Send private message
mostal



Joined: 29 Apr 2005
Posts: 60

PostPosted: Wed Sep 12, 2007 7:58    Post subject: Reply with quote

Carter,

i'have made some tests: if a player target a DM player instead of an item.....it crashes module...do you have any ideas why ?

Mostal
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Development All times are GMT + 2 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group