*cries/bangs-head-on-wall over stupid generator*

Got an idea? Share it here!

Moderators: Mystic Dragon, Xalia, Shard

Post Reply
User avatar
Yakima
Ancient Dragon
Posts: 3824
Joined: Wed Jul 06, 2005 12:17 pm
Location: Minnesota, USA
Contact:

*cries/bangs-head-on-wall over stupid generator*

Post by Yakima »

I've tried this over a million times and the stupid (which is putting it lighlty), thing will not work. I have tried everything I can think of including starting from scratch and adding one array at a time and it still comes up with errors up to the wazzo. I haven't worked on any character pages because I want to use these generators to help me with them. I got the Halfling one to work just fine - it's the Elf one that is not coroporating with me. I've taken it into Dreamweaver (which is old and outdated anyway), and if found nothing to help me. I'm out of ideas...

Can anyone give me any pointers or something because I'm fed up with trying to fix this myself...*beats on script with stick* :cry:
~ Weyrwoman Yakima of Isla Weyr

Isla Weyr: http://www.isla.mage-circle.com
Velare Isle: http://www.velare.mage-circle.com
Treval Dragonry: http://www.treval.mage-circle.com
Alair WolfKeep
The Last Oddessy: http://www.last-oddessy.mage-circle.com
Baskar Castle: http://www.baskar.mage-circle.com
World of Sentra: http://www.sentra.mage-circle.com
User avatar
Shard
Great Wyrm
Posts: 8950
Joined: Wed Jul 06, 2005 11:21 am
Location: San Diego CA
Contact:

Post by Shard »

Does it come up at all in a preview? Like, do you get any results at all?

When I'm working on mine, sometimes I click and get nothing - but that's okay because sometimes that means the 'results' of the click are "there is nothing to be put on screen" or, an array which ends in "" with nothing between.

If you click and something comes up <BRACKETS> obviously that's a missing piece which ought to go somewhere but doesn't.

Paste it to a text file and show me. :)
Author of Repurposed
kshau-protectorate.com
User avatar
Yakima
Ancient Dragon
Posts: 3824
Joined: Wed Jul 06, 2005 12:17 pm
Location: Minnesota, USA
Contact:

Post by Yakima »

I just got a generator for the woodelves finished and it works just fine. It's almost like if I try to do too many it doesn't work which means it could be me. I want to make generators for the races and if there are 'sub' races to have them come up with in that main one - I'm trying to avoid making seperate ones even though those are the only ones that are working.

All I get is the <ARRAYNAME> but when I go check, the array is there, it is labled correctly in both the array title and the Base code. Sometimes, if I move the complaining array to the top of the list is works but often the code will just move to anouther one. Here is the one with all the Elven stuff in it: http://www.geocities.com/cindelfalas/elves_bad.txt .

*headdesk* If I have to, I'll make a whole bunch of generators - one to tell me which race I'm going to and then a gen for each individual race...grrr...but I would LOVE to avoid that one! :P
~ Weyrwoman Yakima of Isla Weyr

Isla Weyr: http://www.isla.mage-circle.com
Velare Isle: http://www.velare.mage-circle.com
Treval Dragonry: http://www.treval.mage-circle.com
Alair WolfKeep
The Last Oddessy: http://www.last-oddessy.mage-circle.com
Baskar Castle: http://www.baskar.mage-circle.com
World of Sentra: http://www.sentra.mage-circle.com
User avatar
Yakima
Ancient Dragon
Posts: 3824
Joined: Wed Jul 06, 2005 12:17 pm
Location: Minnesota, USA
Contact:

Post by Yakima »

Anndd...since I'm uploading things to this account:

Halfling Generator
Itaenan Generator (Woodelf)
~ Weyrwoman Yakima of Isla Weyr

Isla Weyr: http://www.isla.mage-circle.com
Velare Isle: http://www.velare.mage-circle.com
Treval Dragonry: http://www.treval.mage-circle.com
Alair WolfKeep
The Last Oddessy: http://www.last-oddessy.mage-circle.com
Baskar Castle: http://www.baskar.mage-circle.com
World of Sentra: http://www.sentra.mage-circle.com
User avatar
Astra
Ancient Dragon
Posts: 2458
Joined: Wed Jul 06, 2005 10:33 am
Location: The Moon
Contact:

Post by Astra »

wow those generators are really beautifully done o_o
ImageImageImage
User avatar
Yakima
Ancient Dragon
Posts: 3824
Joined: Wed Jul 06, 2005 12:17 pm
Location: Minnesota, USA
Contact:

Post by Yakima »

Yeah...they're pretty (just wish I could draw people...), but I would be better if I didn't have to do them one at a time (for now...I WILL prevail over the Generator Monster!!! Mwahaahaaa!!!!)

I also need to finish/get a list of jobs though I found a decent site for occupations in the middle ages and not sure if I like the magic ability results...will have to fiddle with those a bit more...:P
~ Weyrwoman Yakima of Isla Weyr

Isla Weyr: http://www.isla.mage-circle.com
Velare Isle: http://www.velare.mage-circle.com
Treval Dragonry: http://www.treval.mage-circle.com
Alair WolfKeep
The Last Oddessy: http://www.last-oddessy.mage-circle.com
Baskar Castle: http://www.baskar.mage-circle.com
World of Sentra: http://www.sentra.mage-circle.com
User avatar
Shard
Great Wyrm
Posts: 8950
Joined: Wed Jul 06, 2005 11:21 am
Location: San Diego CA
Contact:

Post by Shard »

The fields <YN>, YN-D and YN-W are referred to in several of the first lines but don't exist.

ANIMAL-W doesn't seem to exist.

In one of the EYES sections, there's a link to EYES-SR which doesn't lead anywhere. (It was also before the ARRAY line, which was weird.)

Aside from those, once you fix the YN areas that'll work. I added them in my test on my copy of Dreamweaver and once I filled those in (with "-missing-" as the result) it worked fine. :)
Author of Repurposed
kshau-protectorate.com
User avatar
Yakima
Ancient Dragon
Posts: 3824
Joined: Wed Jul 06, 2005 12:17 pm
Location: Minnesota, USA
Contact:

Post by Yakima »

:( It still says that HAIR-C (either W,A, or D) is missing...

And EYES-SR was suppose to be EYES-DR...I changed the S to D for that race. ;)
~ Weyrwoman Yakima of Isla Weyr

Isla Weyr: http://www.isla.mage-circle.com
Velare Isle: http://www.velare.mage-circle.com
Treval Dragonry: http://www.treval.mage-circle.com
Alair WolfKeep
The Last Oddessy: http://www.last-oddessy.mage-circle.com
Baskar Castle: http://www.baskar.mage-circle.com
World of Sentra: http://www.sentra.mage-circle.com
User avatar
Shard
Great Wyrm
Posts: 8950
Joined: Wed Jul 06, 2005 11:21 am
Location: San Diego CA
Contact:

Post by Shard »

I'm not sure why you're having that problem still. Here's what I get, keep in mind the -missing- areas are things that my browser caught and I just added a single-line array for to make sure it led somewhere.

Type: Dhamian Elf
Gender: male
Date of Birth: July 7
Age: 137
Hair Color: black
Hair Length: to shoulders
Hair Type slight wave
Height: 6'2
Eye Color: silver
Skin Color: fair
Build: average

Father: First Mate; alive; (fine) Dhamia
Mother: Dolphin Trainer; alive; (fine) Dhamia
Siblings: no siblings
Married: -missing-
Children: no children

Location: Dhamia
Place of Birth: Dhamia
Occupation: Innkeeper
Magical Abilities: natural magic; level 1; not trained; not specialized in a type
Pets: horse (-missing-), blue-tipped dolphin (-missing-)

*
Type: Itaenan Elf
Gender: female
Date of Birth: December 16
Age: 21
Hair Color: dark brown
Hair Length: to mid-back
Hair Type full
Height: 5'10
Eye Color: brown
Skin Color: fair
Build: slender

Father: Blacksmith; alive; (fine) Treval City
Mother: Midwife; alive; (fine) Asborea
Siblings: 1 sister
Married: -missing-
Children: no children

Location: Southern Itaena
Place of Birth: Southern Itaena
Occupation: Tavern Wench
Magical Abilities: rune magic at; level 1; not trained; specializes in earth magic
Pets: wolf (-missing-)

*

Type: Asborea Elf
Gender: male
Date of Birth: January 22
Age: 84
Hair Color: dark brown
Hair Length: to nape
Hair Type slight wave
Height: 5'5
Eye Color: amber gold
Skin Color: fair
Build: slender

Father: Prince; alive; (ememy) Asborea
Mother: Peasant; alive; (fine) Asborea
Siblings: 1 brother
Married: -missing-
Children: no children

Location: Treval City
Place of Birth: Asborea
Occupation: Merchant
Magical Abilities: natural magic; level 3; is attending Treval Magic School as a 3rd Year; specializes in fighting magic
Pets: horse (-missing-), jracini (-missing-)

So, I think the problem must be somewhere different, unless there's a " missing or something weird. I didn't see anything wrong with the HAIR portions, and my version hasn't come up with a break yet... Odd!
Author of Repurposed
kshau-protectorate.com
User avatar
Yakima
Ancient Dragon
Posts: 3824
Joined: Wed Jul 06, 2005 12:17 pm
Location: Minnesota, USA
Contact:

Post by Yakima »

*sighs* Well, I don't know what the problem is. I changed all the YN-? to YN because it wasn't suppose to be like that. I think I'm going to do a generator for each race and subrace as I'm using anouther generator to determine the race or if they are half-whatevers...or more...something like that...I think that might work out better and it will keep it simple for me! :P

Thanks, Shard...I feel kinds stupid that it's not working though...:(
~ Weyrwoman Yakima of Isla Weyr

Isla Weyr: http://www.isla.mage-circle.com
Velare Isle: http://www.velare.mage-circle.com
Treval Dragonry: http://www.treval.mage-circle.com
Alair WolfKeep
The Last Oddessy: http://www.last-oddessy.mage-circle.com
Baskar Castle: http://www.baskar.mage-circle.com
World of Sentra: http://www.sentra.mage-circle.com
PinkDragon
Fledgling
Posts: 323
Joined: Thu Jul 13, 2006 8:18 am
Location: In my own fantasy world
Contact:

Post by PinkDragon »

is there a way to get a random # generator code to work for a generator like you guys make or is there an online tutorial i could use to make one. just wondering
User avatar
Dray
Dracolich
Posts: 9389
Joined: Wed Jul 06, 2005 11:16 am

Post by Dray »

There's a very easy way to do that!




<script language="javascript">
function blah (desc) {
var number = desc.length;
var rand = Math.floor( number * Math.random() );
document.write(desc[rand]);
}
</script>

<script language="javascript">
blah( Array("1", "2", "3", "4") );
</script>



This is the basic code, hopefully it will show up properly when posted.
Just replace the 1, 2, 3 and 4 with whatever numbers or words you want to show up, and there you have it! Make sure you check the quotation marks and commas, or else the generator won't work.

Hope that helps!
PinkDragon
Fledgling
Posts: 323
Joined: Thu Jul 13, 2006 8:18 am
Location: In my own fantasy world
Contact:

Post by PinkDragon »

ya a little but how would i make that code into what shards generators do?
User avatar
Dray
Dracolich
Posts: 9389
Joined: Wed Jul 06, 2005 11:16 am

Post by Dray »

Oh, you mean one in which you click the button and something new pops up?

That involves an entirely different code, which is a lot more complex looking. It really isn't all that difficult once you figure out what parts need to be changed... if you can learn by mimicking, try taking a look at the source-code on Shard's generator, (Shard, do you have a very simple one for her to pick apart?) and substituting the words and phrases that you want. It takes a little work to get to understand it, but it's a great way to learn!
User avatar
Shard
Great Wyrm
Posts: 8950
Joined: Wed Jul 06, 2005 11:21 am
Location: San Diego CA
Contact:

Post by Shard »

Yeah you can always just swipe any of mine and cut out what you don't want.

There are 2 parts to a generator page - the HTML that shows the page itself, and the portion of script which is the generator itself.

Here's one of my ... um, shorter generators. It's still rather array-heavy but at least it'll be easy to trim down.

http://www.geocities.com/abode_elf_dollz/elfnamer.htm

Just right-click, 'this frame' because it's a geocities frame, view source and you can copy the whole thing into a notepad file.

The generator code with content looks like this:

var aVocab = new Array();

var intIncr
var intCat

intCat =0
intIncr =0

aVocab[intCat]= new Array();
aVocab[intCat][0]="BASE"
aVocab[intCat][1] = new Array()
aVocab[intCat][1][intIncr++]="<WORD>"

intCat++
intIncr=0
aVocab[intCat]= new Array();
aVocab[intCat][0]="WORD"
aVocab[intCat][1] = new Array()
aVocab[intCat][1][intIncr++]="<ONE>"
aVocab[intCat][1][intIncr++]="<TWO>"

intCat++
intIncr=0
aVocab[intCat]= new Array();
aVocab[intCat][0]="ONE"
aVocab[intCat][1] = new Array()
aVocab[intCat][1][intIncr++]="<ANIMALS>"
aVocab[intCat][1][intIncr++]="<ANIMALS>"

***

The java code at the bottom of the page is similar to that stuff Dray showed you. (don't forget to remove the html that Geocities adds. lol!)

Basically everything inside the "quotes" is what will eventually show up on the screen. When it's <BRACKETS> that leads to another array which has that name. (Above, would be "ONE" is the new array. It leads to other arrays with words in them.)

Watch for incomplete "quotes" because a missing " mark will ruin the whole thing.

But by all means feel free to swipe my code. :) I swiped it from Steven Savage and the seventh sanctum. He no longer uses Java to code, he uses psp so I can't do that stuff like he does any more... But I like my arrays. :)
Author of Repurposed
kshau-protectorate.com
PinkDragon
Fledgling
Posts: 323
Joined: Thu Jul 13, 2006 8:18 am
Location: In my own fantasy world
Contact:

Post by PinkDragon »

thanks guys
Post Reply