View previous topic :: View next topic |
Author |
Message |
Grey
Joined: 10 Sep 2003 Posts: 42 Location: Australia (Victoria)
|
Posted: Sun Sep 10, 2006 9:59 pm Post subject: absent voters lists |
|
|
the fact of it being written down is not what the issue is, or what 'bothers' me about it what the problem is, is that the interpetations of the teachings have been so warped and far removed from the
There have been some major break- Tsai, C.H. et al. (1999) Effects of substitutions structure, which is widely distributed
No I just didnt manage to get out anywhere, ahh well maybe next time If that was the smallest ever then fark they must have had some big swells in the past, it was small at times but then alot of big
ger that activates several protein kinases, lesions induce an increase in cell number and the same polypeptide.T4 gp41 greatlyen
_________________ Known as both "Grey" and "Seethe"
Last edited by Grey on Wed Sep 08, 2010 2:11 am; edited 4 times in total |
|
Back to top |
|
Grey
Joined: 10 Sep 2003 Posts: 42 Location: Australia (Victoria)
|
Posted: Sun Sep 10, 2006 10:01 pm Post subject: |
|
|
and finally: craft.h
Code: |
/**************************************************************************/
// craft.h -
/***************************************************************************
* The Dawn of Time v1.69r (c)1997-2004 Michael Garratt *
* >> A number of people have contributed to the Dawn codebase, with the *
* majority of code written by Michael Garratt - www.dawnoftime.org *
* >> To use this source code, you must fully comply with the dawn license *
* in licenses.txt... In particular, you may not remove this copyright *
* notice. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* _____ Player Created Custom Items _____ *
* Crafting code originally written by Ryan W. Derbyshire *
* Repeatedly modified by Seethe and Trellan. 2005 *
* Some modifications by Icecool. late 2005 *
* Further modifications by Seethe and Matt. March 2006 *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* _____ Weapon and Armour Balancing Code _____ *
* Original balance code written by Daos - Nov. 2003 *
* (as autostat_oedit[autostat.cpp]) *
* Modified by Seethe - Feb. 2006 *
* Modified/Rewritten by Matt and Seethe - March 2006 *
***************************************************************************/
#ifndef CRAFT_H
#define CRAFT_H
DECLARE_DO_FUN(do_craft );
DECLARE_DO_FUN(do_testweaponbalance );
void show_olc_flags_types_value(char_data *ch, const struct flag_type *flag_table, const char *command_name, long value);
#endif // CRAFT_H
|
be sure you add craft.o into your make file and all should work wonderfully
I believe there is no mud-specific code involved, but if there is please leave me a pm on these forums and i will try to help in correcting this (I am very busy though, so don't expect a speedy reply)
The shops that sell these items require two flags to be set, "room2 cust_shop" and ONE of the other cust_flags (be that weapons [cwep_shop] or armour[carmor_shop], etc)
You also need to create a few simple items, one on each of the apropriate pre-defined vnums (you can change these in the code), they must be set to the correct item TYPE, nothing else needs to be set.
One final note: the balance system (which sets the damage of crafted items automatically) will create an item who's AVERAGE damage falls within the bounds of level*0.5 and level*0.75, the actual damage done will of course, move outside those bounds.
(These values were chosen in an attempt to keep it fairly true to the original balance system)
_________________ Known as both "Grey" and "Seethe"
|
|
Back to top |
|
Daos
Joined: 29 Jan 2003 Posts: 1219 Location: United States
|
Posted: Wed Oct 25, 2006 8:10 am Post subject: |
|
|
*claps* Very cool and well documented  |
|
Back to top |
|
Caothas
Joined: 03 Mar 2007 Posts: 5
|
Posted: Tue Mar 06, 2007 1:23 pm Post subject: |
|
|
Resolved this issue, please see next post.
Last edited by Caothas on Tue Mar 06, 2007 1:45 pm; edited 1 time in total |
|
Back to top |
|
Caothas
Joined: 03 Mar 2007 Posts: 5
|
Posted: Tue Mar 06, 2007 1:25 pm Post subject: |
|
|
Trying to get this to work and I receive the following error:
Code: |
craft.cpp: In function `bool autostat_wepcraft(char_data*)':
craft.cpp:106: `obj_dam' undeclared (first use this function)
craft.cpp:106: (Each undeclared identifier is reported only once for each
function it appears in.)
craft.cpp: In function `void do_craft(char_data*, char*)':
craft.cpp:380: syntax error before `=' token
craft.cpp:393: `add_apply' undeclared (first use this function)
craft.cpp:580: syntax error before `=' token
craft.cpp:787: syntax error before `=' token
craft.cpp:985: syntax error before `{' token
distcc[13408] ERROR: compile (null) on localhost failed
make: *** [craft.o] Error 1
make: *** Waiting for unfinished jobs....
|
Line 106
Code: |
if(obj_dam.apply_objstat(craft->level, &craft->numdice,&craft->sizedice))
|
Line 380
Code: |
item = create_object(get_obj_index(CRAFT_WEAPON_VNUM));
|
Line 393
Code: |
add_apply(item, "damroll", craft->damroll, craft->level, false);
|
Line 580
Code: |
item = create_object(get_obj_index(CRAFT_ARMOUR_VNUM));
|
Line 787
Code: |
item = create_object(get_obj_index(CRAFT_JEWELRY_VNUM));
|
Line 984-986
Code: |
void do_testweaponbalance(char_data* ch, char *argument)
{
char arg1[MIL];
|
Any help is appreciated,
Caothas
|
|
Back to top |
|
Tristan Moderator (of death!!)
Joined: 21 Apr 2004 Posts: 387 Location: US
|
Posted: Tue Mar 06, 2007 2:39 pm Post subject: |
|
|
These errors:
craft.cpp:106: `obj_dam' undeclared (first use this function)
craft.cpp:393: `add_apply' undeclared (first use this function)
are because obj_dam and add_apply are never declared. I'm guessing there's something missing from the snippet.
The other errors are somewhere above the line indicated, try posting the preceding 10 lines or so.
|
|
Back to top |
|
Grey
Joined: 10 Sep 2003 Posts: 42 Location: Australia (Victoria)
|
|
Back to top |
|
Trellan
Joined: 04 Jun 2005 Posts: 45 Location: Columbus Ohio
|
Posted: Wed Jun 25, 2008 8:54 am Post subject: add_apply |
|
|
I was digging through old posts and saw this. I let him know a while ago it was ok to post the add_apply function. It's sort of a combination of the affect_to_obj() and affect_join() functions. I wrote one since there wasn't anything comparable I could find in the code. It keeps an obj from having 3 seperate hp modifiers (or any others), instead it combines them into one. I'm just a neat freak. Keep in mind it should only be used with things that have a paf->where of WHERE_MODIFIER unless you fix it up to accept other things, I just didn't need it for that.
Code: |
void add_apply(OBJ_DATA * obj, char *loc, int amount, int level, bool special)
{
if (obj == NULL)
return;
AFFECT_DATA *paf;
int value;
bool found = false;
value = flag_value(apply_types, loc);
affects_from_template_to_obj(obj);
for ( paf = obj->affected; paf != NULL; paf = paf->next)
{
if ( paf->location == value){
found = true;
paf->type = -1;
paf->modifier += amount;
if (special){
if (obj->level>paf->level)
paf->level = obj->level;
}else
paf->level = level;
}
}
if (!found){
paf = new_affect();
paf->where = WHERE_MODIFIER;
paf->type = -1;
paf->level = level;
paf->duration = -1;
paf->location = (APPLOC)value;
paf->modifier = amount;
paf->bitvector = 0;
paf->next = obj->affected;
obj->affected = paf;
}
return;
}
|
|
|
Back to top |
|
Isaiah
Joined: 22 Feb 2009 Posts: 7
|
Posted: Sat Mar 28, 2009 6:27 pm Post subject: |
|
|
Would you mind posting the obj_dam code as well, Trellan?
|
|
Back to top |
|
Trellan
Joined: 04 Jun 2005 Posts: 45 Location: Columbus Ohio
|
Posted: Fri May 01, 2009 9:36 pm Post subject: obj_dam |
|
|
the obj_dam stuff is in the balance snippet, referenced in the second link in the first post at the top of this topic
|
|
Back to top |
|
Naylor
Joined: 03 Dec 2012 Posts: 95
|
Posted: Mon Mar 11, 2013 10:44 am Post subject: |
|
|
ummm anyone know where i would get a glance at the stuff before the craft.h? all i'm seeing is some light ranting about wat i would guess is a medical thing, and then in the next post it starts:
'and finally: craft.h'
so umm what came before?
|
|
Back to top |
|
Pixie
Joined: 16 Jan 2016 Posts: 56 Location: Pacific Northwest
|
Posted: Sat Jan 16, 2016 4:30 pm Post subject: |
|
|
The original post has some weird stuff in it instead of the snippet and stuff.
Anyone know what it had in it? Looking for exactly this.
|
|
Back to top |
|
Trell
Joined: 28 Jun 2013 Posts: 49
|
Posted: Sun Jan 17, 2016 10:43 am Post subject: The orignal snippet |
|
|
I have a much updated version of the original code for this. I'm at work right now, so can't post, but will be sure to put it up tonight when I get home, or tomorrow afternoon.
|
|
Back to top |
|
Pixie
Joined: 16 Jan 2016 Posts: 56 Location: Pacific Northwest
|
Posted: Sun Jan 17, 2016 2:32 pm Post subject: |
|
|
Fantastic! Thanks a lot!
|
|
Back to top |
|
mmoritz80
Joined: 21 Sep 2018 Posts: 18 Location: Ohio
|
|
Back to top |
|
|