Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 7 8 [9] 10 11 12

Author Topic: Random Magical Effect Generator  (Read 37864 times)

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Random Magical Effect Generator
« Reply #120 on: June 02, 2012, 07:39:40 pm »

Wow this is great! Also, new useful site for web design get!

It's really late over here, but I'll add some more stuff later. Love how everyone is working together.

Also, everyone who feel they can't mod: Just suggest things that fit any of the following categories and one of us can very easily fix it up and adding it:
// In this example we have
// 1 - something that can plain happen to you
// 2 - Colors
// 4 - Plural body parts, if it something not everyone might have end in ", if any". Other things you have such as "clothes" or even "friends" also go here.
// 8 - Weather, including strange weather such as raining strange substances or gravity reversing.
// 16 - durations, numbers of repetitions, or other indications of when somehting happens
// 32 - Single body parts, ahain, apend ", if any" when aproriate. Also may include other things you have one of, such as your family.
// 64 - things that can happen to a body part/ways a body part can change
// 128 - (implied by 1, suggest for that instead])
// 256 - (implied by 64, suggest for that instead])

Also, suggestion I'm not entirely sure I can pull of myself: we should add more categories, and separate out more comonly used things into the sentence template. For example, a "creatures" list and changing some templates to contain the "You turn into", and then you can use cretures easily in other ways to withote having to add them all over again.
Categories we might consider adding: "creatures" "proerties"(intelligence, strength, speed, sensitivity, hearing, density, sharpness), "temperatures"(might have other creative uses with some grammatical twists), "items/materials"(gems and jewlry, a kings feast, magical books), "locations"(in the room, on your person, in a two mile radius, all over the planet, the general vicinity), "people"(this one might be to complicated with posessives and pluralizing differing and stuff)(you, your family, everyone in [LOCATION]) "amount modifiers"(a lot, a little, by an incredible amount, slightly, more and more)

Longer term/less feasibly, we should look into being able to insert tags in any of the stings with a category-referring number, and have it replaced with a string from the corresponding category, recursively. This would mostly replace the templates. You could then do stuff like "You grow a [colour][creture][bodypart] on your [bodypart]" (and the roll for [creture] is "an abdomination half [creture] and half [creture]")
« Last Edit: June 02, 2012, 07:49:09 pm by Armok »
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Cerol Lenslens

  • Bay Watcher
    • View Profile
Re: Random Magical Effect Generator
« Reply #121 on: June 02, 2012, 09:10:25 pm »

Longer term/less feasibly, we should look into being able to insert tags in any of the stings with a category-referring number, and have it replaced with a string from the corresponding category, recursively. This would mostly replace the templates. You could then do stuff like "You grow a [colour][creture][bodypart] on your [bodypart]" (and the roll for [creture] is "an abdomination half [creture] and half [creture]")

http://jsbin.com/idifof/16/edit#html,live

Okay, I added some basic functionality along this line, using a couple of test cases to make sure it worked. You can see the code at the very top, under the Proper Name arrays I created as an example.
Logged
"I've got a plan, hear me out on this one... I want to almost murder you."
"Boy, sure wish as Queen of the entire realm I had somebody to help me out with this. Advisor, tutor, anyone who knows what the hell they're looking at really.

Alas, the life of a Queen is a lonely one. Do the things with the whatsit."

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Random Magical Effect Generator
« Reply #122 on: June 02, 2012, 09:50:46 pm »

Wow, that was fast.

Now to convert everything to this new system and make it iterate; right now, if I added 'aProperLNames[aPNIter++] = "[FNAME_MALE]sson";' that wouldn't work properly if I read the code right. Easiest, if potentially buggy, way is probably to search for if a bracket symbol is present at the start of the function, remember it, and if it was loop over the function again after the replacing has been done.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

RedWarrior0

  • Bay Watcher
  • she/her
    • View Profile
Re: Random Magical Effect Generator
« Reply #123 on: June 02, 2012, 09:53:57 pm »

Once you finish, I say we give it to the people who came up with the original.
Logged

Tarran

  • Bay Watcher
  • Kind of back, but for how long?!
    • View Profile
Re: Random Magical Effect Generator
« Reply #124 on: June 02, 2012, 10:20:45 pm »

Sounds good to me.
Since nobody appears to oppose this, I'm making the modification.

http://jsbin.com/idifof/17/edit

If anyone is annoyed for me marking my modifications with my name, feel free to remove them and tell me. But I'd suggest not removing the comments themselves as they list the text that was modified.
Logged
Quote from: Phantom
Unknown to most but the insane and the mystics, Tarran is actually Earth itself, as Earth is sentient like that planet in Avatar. Originally Earth used names such as Terra on the internet, but to protect it's identity it changed letters, now becoming the Tarran you know today.
Quote from: Ze Spy
Tarran has the "Tarran Bug", a bug which causes the affected character to repeatedly hit teammates while dual-wielding instead of whatever the hell he is shooting at.

Aramco

  • Bay Watcher
    • View Profile
Re: Random Magical Effect Generator
« Reply #125 on: June 02, 2012, 10:43:08 pm »

 Your right middle finger turns fuschia and enlarges, then you become a ghost.

no more needs to be said

 You gain unmatched skill in hot-dog-eating contests, then your voice lowers an octave, and finally you are struck by lightning.

I think it's worth it if I can win money in hot-dog-eating contests
« Last Edit: June 02, 2012, 10:44:52 pm by Aramco »
Logged
Or maybe there's a god who's just completely insane and sends you to Detroit, Michigan in a new body if you ever utter the name "Pat Sajak".

darkrider2

  • Bay Watcher
    • View Profile
Re: Random Magical Effect Generator
« Reply #126 on: June 02, 2012, 11:10:17 pm »

Quote
Your lungs burst into flames until you complete the Trial of 1000 Knives.
My trials are complete and I have reached inner peace.

Quote
Local gravity doubles four times.
So its 16 times normal gravity now? In the news: compressing atmosphere causes untold weather storms and destruction.

Quote
A fissure in the earth opens and releases prehistoric reptiles and then you turn into a catperson.
Best. Spell. Ever.
Logged

Eagleon

  • Bay Watcher
    • View Profile
    • Soundcloud
Re: Random Magical Effect Generator
« Reply #127 on: June 03, 2012, 01:07:45 am »

http://jsbin.com/idifof/18/edit
Added some more curse-like conditionals, and slightly improved things with commas. Still plenty of run-ons, but it should be a bit nicer.

I don't know if I care for the non-setting-neutral ones in that section (Cerol's mostly). It would be fairly trivial to create the option of setting themes for entries, and culling them based on the status of checkboxes - just use a bitfield check on the cooresponding entry in a seperate array, or ignore it if it's absent. That said, I don't know if javascript's arrays support automatically padding lower indexes, which that would require if we didn't want to have an extra aItem<blah> for each entry. JS Bin seems to support including an ample amount of libraries, I'm sure something suitable can be found, but the question is if anyone else is interested.

Once you finish, I say we give it to the people who came up with the original.
Someone should let her know anyway. I was going to before I posted the first link, but I didn't want the topic to sink into oblivion. She also appears to only be on facebook, which I really don't like using in connection with this name.

Quote
All of your fingers turn blue, and then gems and jewelry materialize near you until you seek out a flawless jewel to bind this evil curse.
You become hungry, and then you gain unmatched skill in basketball when others aren't looking. - isn't that always?
« Last Edit: June 03, 2012, 01:09:59 am by Eagleon »
Logged
Agora: open-source, next-gen online discussions with formal outcomes!
Music, Ballpoint
Support 100% Emigration, Everyone Walking Around Confused Forever 2044

Scelly9

  • Bay Watcher
  • That crazy long-haired queer liberal communist
    • View Profile
Re: Random Magical Effect Generator
« Reply #128 on: June 03, 2012, 01:13:07 am »

What are the names used for? I can add a bunch of em if you want.
Logged
You taste the jug! It is ceramic.
Quote from: Loud Whispers
SUPPORT THE COMMUNIST GAY MOVEMENT!

Cerol Lenslens

  • Bay Watcher
    • View Profile
Re: Random Magical Effect Generator
« Reply #129 on: June 03, 2012, 04:32:17 am »

http://jsbin.com/idifof/18/edit
Added some more curse-like conditionals, and slightly improved things with commas. Still plenty of run-ons, but it should be a bit nicer.

I don't know if I care for the non-setting-neutral ones in that section (Cerol's mostly). It would be fairly trivial to create the option of setting themes for entries, and culling them based on the status of checkboxes - just use a bitfield check on the cooresponding entry in a seperate array, or ignore it if it's absent.

Blah. I honestly hadn't thought about keeping it setting-neutral. Might just be easier to set the Earth-specific results to something generic like "You are crowned King (or Queen) of a major monarchy," "You are crowned King (or Queen) of a major non-monarchy,"  and/or "You are crowned King (or Queen) of another planet."

What are the names used for? I can add a bunch of em if you want.

I just had a couple of example results in there - "Your name is changed to <BUNCHANAMEVARIABLES>" for male and female names. (Though I was considering making a variable that just randomly chose from either list, which would allow me to condense that to one result.) I was considering adding others later, such as copying the current ones for the 'and' uses and maybe coming up with something like "You gain the eternal hatred of Lord <BUNCHANAMEVARIABLES>" and so on. Feel free to add more if you'd like.

Edit: http://jsbin.com/idifof/19/edit#html Removed Earth-based names from my options, as well as the wookiee thing and added the above name variable results. Left the February 29 thing in, but you can remove it if you don't want to reference Earth months. I just liked the 'once a leap year' option, and didn't have a better way to frame it.
« Last Edit: June 03, 2012, 04:46:37 am by Cerol Lenslens »
Logged
"I've got a plan, hear me out on this one... I want to almost murder you."
"Boy, sure wish as Queen of the entire realm I had somebody to help me out with this. Advisor, tutor, anyone who knows what the hell they're looking at really.

Alas, the life of a Queen is a lonely one. Do the things with the whatsit."

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: Random Magical Effect Generator
« Reply #130 on: June 03, 2012, 05:31:17 am »

It gave me this:
Quote
You are crowned King (or Queen) of the nearest democracy until you complete the Trial of 1000 Knives.

Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.

zomara0292

  • Bay Watcher
  • Its a lie. he is still an escaped lunatic brony.
    • View Profile
Re: Random Magical Effect Generator
« Reply #131 on: June 03, 2012, 07:33:32 am »

Quote
Local gravity halves until you learn the value of friendship.
Quick, watch MLP! And learn Magic!

Quote
Local gravity stops until you complete the Trial of 1000 Knives. You breasts, if any, suddenly fill with milk until you spend a night in a haunted house.

Soo. . . . . . . . I am not even going to say it. . . . I will stop right there actually.
« Last Edit: June 03, 2012, 07:36:21 am by zomara0292 »
Logged
I hear a piranha is good eating.  I have a spear; I'll be fine!
The Pilot and their cargo handlers paused when they saw that the entire camp is covered in eldritch runes coated in blood. And rotting monkey corpses everywhere..

They decide that they didn't get paid enough for this..

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Random Magical Effect Generator
« Reply #132 on: June 03, 2012, 11:37:02 am »

Ok, did some more serous coding.

* I got iteration to work perfectly, although tags now have to contain # somewhere since it broke when I tried to search for brackets.
* striped away some of the content for testing more easily, this is easy to paste back from a previus version
* with the above, discovered it often returns "undefined", reason unknown, someone needs to fix this bug.

* curently working on generalized the entire system, it's a ****ing mess.


edit; ok, I give up. This is utterly imposible. You should be able to dicern what I'm trying to do from the source, please help. :(
« Last Edit: June 03, 2012, 12:14:24 pm by Armok »
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Gatleos

  • Bay Watcher
  • Mournhold... City of Light... City of MAGIC!
    • View Profile
    • Someone Sig This
Re: Random Magical Effect Generator
« Reply #133 on: June 03, 2012, 12:02:04 pm »

Quote
Your penis, if any, gains the powers of Mr. fantastic repeatedly. Your left arm throbs with pain, but only for a few minutes.
:o
:-[
The creepy part is this that I'm left-handed. I... I think it may be mocking me.
Logged
Think of it like Sim City, except with rival mayors that seek to destroy your citizens by arming legions of homeless people and sending them to attack you.
Quote from: Moonshadow101
it would be funny to see babies spontaneously combust
Gat HQ (Sigtext)
++U+U++ // ,.,.@UUUUUUUU

Eagleon

  • Bay Watcher
    • View Profile
    • Soundcloud
Re: Random Magical Effect Generator
« Reply #134 on: June 03, 2012, 01:39:35 pm »

Ok, did some more serous coding.

* I got iteration to work perfectly, although tags now have to contain # somewhere since it broke when I tried to search for brackets.
* striped away some of the content for testing more easily, this is easy to paste back from a previus version
* with the above, discovered it often returns "undefined", reason unknown, someone needs to fix this bug.

* curently working on generalized the entire system, it's a ****ing mess.


edit; ok, I give up. This is utterly imposible. You should be able to dicern what I'm trying to do from the source, please help. :(
Use a proper IDE if you're going to make changes this big =P Will help tremendously. Eclipse has plugins for javascript I believe. I only really know Java, C#, and a couple of BASIC dialects, and I have other projects to work on so I can't help much here. The debugger will be able to tell you what indexes it's using that are undefined and from there it shouldn't be too hard to track down what's going wrong.
« Last Edit: June 03, 2012, 01:41:38 pm by Eagleon »
Logged
Agora: open-source, next-gen online discussions with formal outcomes!
Music, Ballpoint
Support 100% Emigration, Everyone Walking Around Confused Forever 2044
Pages: 1 ... 7 8 [9] 10 11 12