Help - Search - Members - Calendar
Full Version: Factions (Reborn)
RPG RPG Revolution Forums > Scripting > Script Tutorials > RGSS2
Pages: 1, 2, 3, 4
SojaBird


Version 2.0.2.02 (Reborn)
Author SojaBird
Release Date
BETA > 4-12-'08 - 29-12-'08
v1.0 (full release) > 03-01-'09
v1.2 (not released) > 07-02-'09
v1.3 > 14-02-'09
v2.0 (Reborn) > 28-04-'09
v2.0.1 (Reborn) > 01-05-'09
v2.0.2 (Reborn) > 05-06-'09
v2.0.2.1 (Reborn) > 05-06-'09
v2.0.2.2 (Reborn) > 07-06-'09


Introduction
Since I started making the demo for the script, I figured out that lot's of features were missing. So I decided to script some more funtions. Now there's a huge list of functions that can be used so make sure you'll read the descriptions on every function before you're going to do anything with the script (that's what I would reconment).

Here's a list of some of the major functions of the script:
- Manage factions and their reputation with ease;
- Allow the player to look in to the reputation stats;
- Make conditions base on reputation with factions;
- Enemy encounters can give reputation;
- Discounts and penalties can be aplied at the improved shop;
- Messages can show dynamic info about factions!!

Enjoy and have fun!


Features
BETA
  • Create and manage your own factions.
  • Use many extra features.
v1.0 (full release)
  • Add factions;
  • Manage them;
  • Add, remove and set value's of the reputation;
  • Show extra discriptions and pictures;
  • Message faction-value's, using a simple "/FAC[name]"-command;
  • And much, much more!..
v1.2 (not released)
  • A new and better print-function (scripter-tool).
v1.3
  • Set starting factions;
  • New call script "add_factions" so that you can add more factions at the same time;
  • Game_Temp changes into Game_System, so that I could scrap the Save and Load code of the factions from the script.
v2.0 (Reborn)
Some of the major functions of the script:
  • Manage factions and their reputation with ease!
  • Allow the player to look in to the reputation stats!
  • Make conditions base on reputation with factions!
  • Enemy encounters can give reputation!
  • Discounts and penalties can be aplied at the improved shop!
  • Messages can show dynamic info about factions!
v2.0.1 (Reborn)
  • Some small shopping bug's fixed.
v2.0.2 (Reborn)v2.0.2.1 (Reborn)
  • A small bug fix.
v2.0.2.2 (Reborn)

To come features
- More if sugested...


Script
Click to view attachment


Customization
After reading all of the information on the options, you'll find the modification-module.
Make sure you'll make the script as suitable for you as you can.
If options you want to add, are missing, just contact me via the topic or pm.


Compatibility
VX only.

The script rewrites the following defenitions
  • create_command_window (Scene_Menu) (when no use of 'New Menu Items')
  • update_command_selection (Scene_Menu) (when no use of 'New Menu Items')
  • return_scene (Scene_File) (when no use of 'New Menu Items')
  • update_message (Window_Message)
  • update_buy_selection (Scene_Shop (optional))
  • update_sell_selection (Scene_Shop (optional))
  • decide_number_input (Scene_Shop (optional))
  • draw_item (Window_ShopBuy (optional))
  • enable? (Window_ShopSell (optional))
  • make_encounter_troop_id (Game_Player (optional))


<div style="margin:20px; margin-top:5px"><div style="margin-bottom:2px">[Show/Hide]
Screenshots</div><div style="margin: 0px; padding: 6px; border: 1px inset;"><div style="display: none;">



</div></div></div>

DEMO v2.0.1



Installation
Put the script above main.
Make sure you read all the instructions!
Customise the script to your needs.
In game add and manage the factions by useing callscripts (see the instructions on how to do it).
Credit me pls.

TIP!
You could use 'New Menu Items' to make the script more compatible with other scripts.


FAQ
Comming if needed.


Terms and Conditions
Credit me with site, and the script is free for use in NONCOMERCIAL projects.
If anyone want some changes, please pm me or post it here, I'll track the topic.
Garge
It's spelled Faction, otherwise 9/10th of the forum goers would get the wrong idea. Joking aside, very cool script.
SojaBird
o hehe fun, srry for that...that's some great feedback tongue.gif hehe


oke thanks for replying so fast...
have some improvements?
woratana
Just a suggestion, you shouldn't edit the old Window_Help. It could create the compatibility issue in the future~^^

I think to create new class would be better idea. ^o^/
SojaBird
oke thanks, let's do that...though I've edit it so that I doesn't changes any function or things for other helpwindows in the game...but perhaps u're right wink.gif thanks wora




UPDATE, NEW VERSION:

solves the problems:
  • Fractions > Factions (Garge)
  • Bitmap isn't drawn totaly (Garge)
  • New class for the help_window instead of editing the old one (Woratana)
  • In-messages factionvalue-display (me)
AlbinoWalken69
Whenever i try to add a faction this error comes up:

NameError occurred while running script.

uninitialized constant Game_Interpreter::Pirates

and whenever i try to open the reputation menu, i get this error:

Script 'Faction' line 250: RGSSError occurred.

failed to create bitmap

please help!
SojaBird
Hey AW69,

The "NameError" caused by a "uninitialized constant Game_Interpreter::Pirates" has something to do with an other script you are running. Probably one wich get's info from, or changes the Game_Interpreter. The error occurres because the script needs a value (Pirates, in the Game_Interpreter), but doesn't have one.

The second RGSSError, seems to be occurred because of an bitmap that can't be drawn. The only posible reason when a bitmap can´t be drawn, is when it´s smaller than the minimum size of 32*32 pixels. The code for the creation of this bitmap (I guess it's the one that is on line 253 (you deleted 3 lines of info somewhere?)), is the following
CODE
self.contents = Bitmap.new(width - 32, (2 * Line_Height) * $game_temp.faction_data.size)
What it does, is setting the bitmap for the content of the faction-window. The size of the bitmap is controlled by:
  • the with of the window,
  • the Line_Height
The width of the window is set by the script itself, so it can't be his fault. The Line_Height however, is set by the user (by U). This is what seems to give the problem. The height of the bitmap needs to be at least 32 pixels high, so the Line_Height needs to be at least (32/2=)16, and the faction_data size at least 1. Though, that would meen their will always be a error if the faction array is empty...Something I've to solve. This is easily done, so expect a update in like only 5 minutes.

Now your second problem has been solved, the first one remains. Perhaps if you could post/pm me what other scripts you are using besides the faction_display [BETA], I can have a look at the error again.


Thanks for your feedback.
Greatzz, SojaBird.
AlbinoWalken69
i never deleted any of the lines and i made sure i copied the whole thing from your link haha
so i have no idea wat happened there lol
thanks for the help with the second problem, but with the first problem, i dont have any other scripts in my game
i only put the faction script in a game so i could test it out before putting it into my current project
SojaBird
Oke I've started a new game and insert the script...it works fine for me...though I did discoverd an ugly bug with the help-text...fixing that atm.


btw make sure you'll get the newest version...I'll start numbering them when I upload a new one wink.gif
AlbinoWalken69
ok thanks
just let me know when you update the script thumbsup.gif
SojaBird
sure... nr 5 is up now...go check it out smile.gif
SuperMaxZero
Pretty cool script, I like it. One caveat...
I didn't see the new version (if it's any different), but I think it would be neat to have a picture next to each faction; their emblem, or whatever.
Every game I know of with a faction system does it.
SojaBird
Hey SMZ,

First, thanks for your reply.
The feature you're mentioning is allready in the script (from the start (version 1)). Though, it's not working on default. Go and find the customazation module (after all the call-script explanations). There you'll find the option called "Display_Picture", set that to true. In this way, the picture you've set for each faction will be displayed in front of the other information (name + bar).
Perhaps I'll include the function to set 2 different pictures, one for in the description, and one in front of the other info (does that sounds like something that will improve the script?? (or, do we want that function????)).

See how it looks wink.gif


Greatzz,
SojaBird.
SojaBird
Hey Kevin,

At first I want to say thanks for your feedback. With your help I'll get user-expirience with witch I can improve the script, as well as the description on how to use it.
The error you got, is created by the description of your factions you've added. The correct way to set the description, is by putting it in a couple of those things "your description here". So lucky for me that it doesn't has to do with all the scripts you are using, god thank it does stroke with them all =D All you have to do, is put the descriptions of the factions in those "..." and you'll be fine.


Greatzz,
SojaBird.
[Show/Hide] @AlbinoWalker
For you, AlbinoWalker,
I think your first error is caused by the same mistake Kevin made wink.gif


Greatzz again,
SojaBird.
O and ps,
I'll soon be making an FAQ and some demo-material.
Puppet Of Fate
I'm really want to use this but it's interacting with my Advanced Text System. When I do get around that it says there is a syntax error. Can you help?
SojaBird
Hey Kira,

I just check out the ATS script. It seems that ModernAlgabra uses the same text-substitution as I'm, the \f[...] tag. For the sake of compatability (is that a word?), I'll changes it to \fac[...] if that's a solution.


Greatzz,
SojaBird.

(it will be included in the next version)
SojaBird
srry for the bump/dubblepost, but this is about the update!

UPDATE, BETA ~ 6 released
Now the script works oke with the ATS...Though, and srry for the time it's going to cost, but \F[name] to show inmessages factionvalue has changes to \FAC[name]
Puppet Of Fate
Okay now it just says "Syntax error occured while running script." in the exact space where I want to add a faction. Why is that? And yes that is all it says in the little error box thing.
SojaBird
Could ya post a pic of it pls?
Can't realy think of sth that could do it wrong...
Puppet Of Fate
PICTURE REMOVED BECAUSE PROBLEM WAS SOLVED.
SojaBird
Oke that does do the trick (could you perhaps put the picture in a spoiler because of the size pls!),

I'll make an faq and demo on how to add a faction since that isn't clear enough for now.
The prober way to add a faction, is indeed useing the code you've used, though some small things are wrong.

I'm going to do an example with your values:
- Name of the faction = Harmony Sentinels
- Max value the rep can go = 25000
- Value at the introducing of the faction = 0
- Extra description of the faction = none (the standard)
- Picture of the faction = none (also the default)

Now let's make the code for that faction.
We'll start with the expresion to tell the script what to do. We want to add a factions so lets say that
CODE
add_faction
After that's done, we're going to tell it what faction he needs to add, the "Harmony Sentinels". Let's do that
CODE
add_faction("Harmony Sentinels"
Make sure you've put the name, as well as the description and picturename in bracklets (those things "..."). Now enter the max value and the starting value, wich are respectively 25000 and 0
CODE
add_faction("Harmony Sentinels", 25000, 0
For the extra description and picture, we're going to use the standards from the script. So we don't have to tell the script again what value's those should be. So we just going to forget them, they'll be fine afterall. All we have to do is end the statement to add a faction. Let's close up
CODE
add_faction("Harmony Sentinels", 25000, 0)
That's it, now the faction will be added with it's values that you've told the script to do.
If you want to add extra description, let's say "The faction that rule all of the golden orbs of justis.", we'll have to input that in the script as well
CODE
add_faction("Harmony Sentinels", 25000, 0, "The faction that rule all of the golden orbs of justis.")
Now that line of text will be displayed in the topbar, when the faction is selected in the faction-window. If you want to add a picture as well, this must be enabled in the script, you'll have to add an other last expresion to the code. Let's say we want to show the picture "sentinels" (from the graphics/picture folder). We'll turn the option to display HELP_PICTURE to true and finish the code for the last time
CODE
add_faction("Harmony Sentinels", 25000, 0, "The faction that rule all of the golden orbs of justis.", "sentinels")
That will do the trick.

If this is a bit diffecult, just wait for the videotutorial on the script...It'll be here in no time wink.gif


Greatzz,
SojaBird.
Puppet Of Fate
Dude thanks so much! I know what the problem was though. On the actual script this is how you posted the add factions thing.

add_faction(name, max_value, start_value, *help_text, *pic)

I didn't know to put the " in. Thanks so much!
SojaBird
Haha ya I saw that =)

Though, perhaps it's a bit confusing.
I'll be making a tutorial on that in the morning.


Greatzz,
SojaBird.
AlbinoWalken69
hey i havent been here in awhile, exams are killing me
but i went back to my project and im still getting the same error with your script

NameError occurred while running script.
uninitialized constant Game_Interpreter::Pirates

whenever i initiate an event that creates a faction.
heres wat i used for the call script:

add_faction(Pirates, 1000, 0)

am i doing something wrong?
SojaBird
Hey AlbinoWalken,

I realy should make a F.A.Q. I'm afraid sweat.gif
Haha, yea the most common problem that occures, is the one you've countered as well.
The correct way to add a faction is, indeed, by using the code you've used...only there missing 2 little things.
CODE
add_faction("Pirates", 1000, 0)
Should be the correct code to use. Make sure that all strings that are put in a script, need to be between those things "...". Sorry for the unconviniënce. I'll make a video tutorial on the script now wink.gif


Greatzz,
SojaBird.
AlbinoWalken69
and i have one last problem with the script lol
whenever i load a saved game that already had some factions discovered, all of the factions are completely gone from the reputation menu. i dont know wat is causing this
please help
thank you so much for all of your help so far btw, this is an awesome script
SojaBird
Hey Albino,

Sorry for the delayed reaction, but you know...christmass and stuff (MERRY X-mas 2 ya all btw (better late than never)).
The problem you're getting is someone I didn't tested out jet. It seems that the faction data array (in the Game_Temp) isn't saved when a save is created...Thank's for this information, I'll do what ever I can to finished the script as soon as posible, as well as this function that simply is a MUST, so that it can come out of BETA and can be released for real.

Hope 2 cya all soon back here.


Greatzz,
SojaBird.
SojaBird

UPDATE
BETA ~ 7 is up, ready to be downloaded.
This time the factions you've added will be stored in the save files.

Comming up next, is hopefully that the scrolling part has been solved.
Kovu
Anychance of a DEMO?
SojaBird
It's probably going to be a video demo (perhaps I'll share the made data with you afterwards).
Though I'm still upset I can't get the scrolling done.
I'm currently working on the function to have like multiple coloms of faction's, so there will be move visable...

Hey this brings me on a idea!!
Why scrolling vertical, when it can be done horizontal ohmy.gif

Haha,
Expect that function soon biggrin.gif


Greatzz,
SojaBird.
Kovu
Any kind of Demo would be nice.

Lol that sounds alot easier to make too. Perhaps shortening the width of some of the stats to show more stuff?
SojaBird
Yea, I've actualy allready a working version...though that include's 2 different windows, wich still show the same factions.

Anyway, horizontal scrolling is going to be much more easy, since the left and right button aren't defined to a specific action jet biggrin.gif


This is going to be nice smile.gif




Greatzz,
SojaBird.
SojaBird
NEWS FLASH!!
2:45 AM, SojaBird completed the script.


Hi everyone and welcome to the post you've all been waiting for. Now, today, at this time in the darkness of the night, the script, Factions is finaly done. It's working for 100%, so it's up to you now to make it usefull!!
  • Add factions;
  • Manage them;
  • Add, remove and set value's of the reputation;
  • Show extra discriptions and pictures;
  • Message faction-value's, using a simple "/FAC[name]"-command;
  • And much, much more!..


Avalible NOW



Greatzz,
SojaBird.
The Wizard 007
Good job Pim. I've been watching and waiting for this one for a while. I'll let you know if I find bugs.
lonelyshinobi
Uhh...
Sorry...
I know this is a very stupid question, but I am new to all of these things (rpg maker and scripts), so I am a total noob...
I just want to know what is the meaning of this 'faction'??
This topic caught my eyes because there is the word 'reputation' and I am looking for scripts that will set something like reputation points that you will gain after completing quests (something like Tales of The World: Radiant Mythology)...
So, is this script the right thing??
Again, I'm sorry for asking a stupid question like this but I feel like I better ask...
Thanks for wasting your time to answer this...
Thank you...
Kovu
Cool you finished it! biggrin.gif

Ummm still.....Demo smile.gif Im still kinda lost with where to add the factions names.
SojaBird
[Show/Hide] @Wizzard 007
Hey and thanks,

I would realy apriciate it if any of you would let me know if there are bugs or things that would be usefull to implent in the script (such as new features).
I've dedicated a lot of my time and efford in the script, so I got somekind of connected with it. It just love it when it works as it should or better biggrin.gif

Thanks again.


Greatzz,
SojaBird.

[Show/Hide] @Shinobi
Hey,

First off all, your not wasting any of my time useless since I like it to help people to get to know my script.
With factions I meen groups of people, monsters or what so ever that share the same thoughts and all. I actualy inspired the script on the reputation thing from World of Warcraft (WoW). You see, when you complete quests in WoW, you get reputation...but only for a sertain faction you've done the quest for. For example, if you did a quest for the elfs, you get reputation with the elfs and not with the humans, since they don't care if you do, or don't do quests for the elfs.
Anyway, it's a pretty good way to display and store data such as reputation. I can reconmend you to try it out or to wait for the tutorial so that you can get an idear on what the script does and if it's usefull for you.

Anyway, don't be afraid to ask 'nooby-looking-questions', since most of the time they aren't noobish at all.
Welcome to the forum and have fun.


Greatzz,
SojaBird.

Hey hey, welcome back.

Thanks for finding my script cool biggrin.gif
The demo will come soon I hope, wich is going to be together with a video tutorial I guess.

Keep a sharp eye on the topic.


Greatzz,
SojaBird.
lonelyshinobi
I see, Thank you very much!
I've tried it but I don't know where to put the faction names as well...
so I'll just wait for your tutorial...

Thanks!!
SojaBird
Haha that's oke...
I try to make it today, though I'm not sure if I will tongue.gif


Greatzz,
SojaBird.
wortana
This is great and it reminds me of ES4 Oblivion with the warriors guild and shit great work

10
/
10
SojaBird
Well thanks Wortana...

I hope you enjoy it realy much.
Tell me if I can improve something or some feature you miss smile.gif I would realy apriciate it.


Greatzz,
SojaBird.
Endar
One thing you could try to do is making a demo (with tutorial) for the scripting-handicapped. I'm having trouble with this script, can't make it work sad.gif Somehow the game mistakes the name of my faction as a constant.

EDIT: Forget the problem I had. Managed to solve it.
SojaBird
Haha oke.

Though I'll make some demo's and tutorials after my schoolwork wink.gif


Greatzz,
SojaBird.
Mickadell
Comment
Rate: Ok

I like it. it worked well.
SojaBird
Thanks.

If there is anything you want to be added or to be improved, pls tell me.
I love to work some more on this one biggrin.gif


Greatzz,
SojaBird.
Arthin
QUOTE (pim321 @ Jan 18 2009, 02:20 PM) *
Thanks.

If there is anything you want to be added or to be improved, pls tell me.
I love to work some more on this one biggrin.gif


Greatzz,
SojaBird.


SojaBird or Pim: you have really been working out! I'd never even dream of this day coming biggrin.gif I can't believe myself. I left the RPG community long ago because of I lost interest. You have brought it back. I thank you very much. Indeed great work. I'll check it out tomorrow after school. I look forward using this wonderful work.

Awesome.
Cheers. Arthin.
SojaBird
Haha well thanks,

I didn't know I'm that a RRR member-comeback-puller tongue.gif Haha, great to have you back Arthin.
Hope you'll be here some more time now wink.gif


Greatzz and welcome back,
SojaBird (no prob what you call me wink.gif )
Kovu
So has a Demo been made yet? smile.gif
SojaBird
Nope sorry,

Working my @ss off for the podcast to come.
Though perhaps I have some time today.


Greatzz,
SojaBird.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.