NWN - A Knights Tale

A Forum created for the Neverwinter Nights PW Story Server A knights Tale
Home­FAQ­Search­Memberlist­Usergroups­Register­Log in
Post new topic   Reply to topicShare | 
 

 Cotton Gin?

View previous topic View next topic Go down 
AuthorMessage
Zelknolf



Posts: 28
Join date: 2008-08-06

PostSubject: Cotton Gin?   Sat Sep 13, 2008 2:54 pm

So, separating seeds from cotton is brutally time consuming in its current state. It's 6 seconds /head, which translates to 2.8 spools of thread per head (10.7 seconds for enough cotton to make a bolt of cloth under ideal conditions, though conditions will never be ideal, as the crafting system makes extensive use of the Random() function, which is bugged in very documented ways, described here: http://www.nwnlexicon.com/compiled/function.random.html) I think that, when compared to other crafts (where raw materials are immediately able to be to be put through their first transformation) a quicker - but not perfect, as spinning always produces at least one spool of thread - would be a good addition to the crafting system. I'm thinking we make a cotton gin, though a primitive one, perhaps that would eat the seeds but give cotton at 3 seconds/head instead of six. The lack of seeds would be a disincentive to those who are hard up for cash or those who planned on replanting, but the quicker speed could help soften the (almost unapproachable, as the minimum clothmaking to attempt wool is 50%, and the minimum for silk is 75% -- both of those being the skill required to gain a 1 in 1000 chance at creating the cloth) tailoring craft.

Of course, I can script this (wouldn't suggest we add it otherwise) if it ends up being adopted.
Back to top Go down
View user profile
Jawwagner



Posts: 31
Join date: 2008-08-06

PostSubject: Re: Cotton Gin?   Sat Sep 13, 2008 7:30 pm

Well I am open to it . Send me the script and I will put it in for testing, then make my decision.
Back to top Go down
View user profile
Zelknolf



Posts: 28
Join date: 2008-08-06

PostSubject: Re: Cotton Gin?   Sun Sep 14, 2008 12:09 am

To be placed in the OnUsed event of the cotton gin:

Naming it _use_cottongin (or something like it ) would follow the naming conventions of the UOAbigail system fairly closely.

Code:
void UseAgain(object oPC, object oSelf);

void main()
{
    object oPC = GetLastUsedBy();

//=== First a check to make sure that the cotton gin isn't already in use  ===//
    if(GetLocalInt(OBJECT_SELF, "iAmInUse"))
    {
        SendMessageToPC(oPC, "You must wait until the engine processes the cotton it has to add more.");
        return;
    }

//=== Next, an early return to handle people who aren't carrying any cotton ===//
    object oCotton = GetItemPossessedBy(oPC, "FLOWER_COTTON");
    if(!GetIsObjectValid(oCotton))
    {
        SendMessageToPC(oPC, "You don't have any cotton to run through the engine.");
        return;
    }

//=== And then a check for compatibility with the UOACrafting system        ===//
    if(GetLocalInt(oPC,"iAmDigging"))
    {
        FloatingTextStringOnCreature("You may only perform one craft at a time.", oPC, FALSE);
        return;
    }

//=== The remainder is a simple process. Mark the gin as in use, destroy    ===//
//=== a head of cotton, wait three seconds, then clear the marker and set  ===//
//=== the PC to try one more.                                              ===//
    DestroyObject(oCotton);
    DelayCommand(3.0f, CreateItemOnObject("cotton", oPC));
    SetLocalInt(OBJECT_SELF, "iAmInUse", 1);
    DelayCommand(3.0f, DeleteLocalInt(OBJECT_SELF, "iAmInUse"));

    DelayCommand(3.0f, UseAgain(oPC, OBJECT_SELF));
}

void UseAgain(object oPC, object oSelf)
{
    int iCurrentAction = GetCurrentAction(oPC);
    if(iCurrentAction == ACTION_MOVETOPOINT  ||
      iCurrentAction == ACTION_ATTACKOBJECT ||
      iCurrentAction == ACTION_CASTSPELL    ||
      iCurrentAction == ACTION_REST        ||
      iCurrentAction == ACTION_PICKUPITEM  ||
      iCurrentAction == ACTION_SIT) return;
    AssignCommand(oPC, ActionInteractObject(oSelf));
}
Back to top Go down
View user profile
Jawwagner



Posts: 31
Join date: 2008-08-06

PostSubject: Re: Cotton Gin?   Sun Sep 14, 2008 1:08 am

Script does not compile you got a error on :


DelayCommand(3.0f, CreateItemOnObject("cotton", oPC));



I took care of it ..........you didnt need the delay on it
Back to top Go down
View user profile
Zelknolf



Posts: 28
Join date: 2008-08-06

PostSubject: Re: Cotton Gin?   Sun Sep 14, 2008 10:19 am

... really? The thing was doin' fine on my rig, too. I'm tempted to shake a fist at the forums, but usually when they pooch punctuation, they'll do it consistently. :/

Suppose it's not the end of the world; it just means getting immediate results instead of delayed results on the first use. Variables are keeping people from just spamming the thing.
Back to top Go down
View user profile
mardukthemaster



Posts: 2
Join date: 2008-09-18

PostSubject: Re: Cotton Gin?   Thu Sep 18, 2008 9:33 am

I love the new addition of the Cotton Gin and the Automated Spinning wheel that takes your cotton and spins it until it's all done or you close it. Personally I would love to see this expanded, perhapse to the forge for smelting ore, or fletching, some of those extremely repetive tasks that is a strain to drag, drop, wait, drag drop wait, repeat until done. Thank you.
Back to top Go down
View user profile
 

Cotton Gin?

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You can reply to topics in this forum
NWN - A Knights Tale :: Thoughs and Ideas concerning the State of the Server-
Post new topic   Reply to topic