Customizable script request: alliances amongst factions

that still leaves me in the dark about the data manager, and saving varibales to file
Saving and such comes later, if you can't decide on how you want your classes to be structured there's no way you can decide how you want them to be saved.

That can be done later when you have the structures ready and working. I am just suggesting you to keep all variables together for easier managing/saving, but if you prefer to save them separately it's still up to you.

Only continue below this point when you are ready with all the classes working:

Spoiler
module DataManager <- The module you should be looking for

def self.create_game_objects <- The place you create a new global game object

def self.make_save_contents <- The place you manage what to save

self.extract_save_contents(contents) <- The place you manage what to load
Spoiler
Code:
class Leaders  def initialize    @Faction = "None"    @Family = "None"    @Influence = "100"    @Age = "45"    @Child = "None"    @Father = "None"    @Mother = "None"    @Brother = "None"    @Sister = "None"    @Personality = "Agressive"    @Name = "None"  end  def Faction    @Faction  end  def Faction=(val)    @Faction = val  end    def Family    @Family  end  def Family=(val)    @Faction = val  end    def Influence    @Influence  end  def Influence=(val)    @Influence =  @Age * val  end    def Age    @Age  end  def Age=(val)    @Age = val  end    def Child    @Child  end  def Child=(val)    @Child = val  end    def Father    @Father  end  def Father=(val)    @Father = val  end    def Mother    @Mother  end  def Mother=(val)    @Mother = val  end    def Brother    @Brother  end  def Brother=(val)    @Brother = val  end    def Sister    @Sister  end  def Sister=(val)    @Sister = val    end  def Personality    @Personality  end  def Personality=(val)    @Personality = val  end    def Name    @Name  end  def Name=(val)    @Name = val  end  end$Leaders_Rome = ["Manius", "Gaius", "Julius", "Septimus", "Decius", "Leuke", "Maximus", "Spartacus", "Aemilianus", "Aemilus", "Aetius", "Agrippa"]$Families_Rome = ["Juliana", "Trilian", "Scipio", "Brutti"]$Sons_Rome = $Leaders_Rome$Daughters_Rome = ["Julia", "Gaia", "Mania", "Septima", "Decia", "Lucia", "Maxine", "Spartia", "Aemi", "Amilia", "Aetia", "Agris"]$Personality_Rome = ["Agressive", "Loyal", "Cautious", "Peaceful"]$name_rome = $Leaders_Rome[rand(12)] $surname_rome = $Families_Rome[rand(4)]$Rome_son_or_daughter = rand(2)if $Rome_son_or_daughter == 1  $child_rome = $Sons_Rome[rand(12)]else  $child_rome = $Daughters_Rome[rand(12)]end$Roman_Leader = Leaders.new$Roman_Leader.Name = $name_rome$Roman_Leader.Faction = "Rome"$Roman_Leader.Family = $surname_rome$Roman_Leader.Age = rand(100)$Roman_Leader.Influence = ($Roman_Leader.Age * 1.5)$Roman_Leader.Child = $child_rome$Roman_Leader.Father = $Leaders_Rome[rand(12)]$Roman_Leader.Mother = $Daughters_Rome[rand(12)]$Roman_Leader.Brother = $Leaders_Rome[rand(12)]$Roman_Leader.Sister = $Daughters_Rome[rand(12)]$Roman_Leader.Personality = $Personality_Rome[rand(4)]p $Roman_Leader
the above code was added to the diplomacy script, as it is essential for determining status and enemies and allies. The problem I'm having is Faction is displayed as the family name, and Family is displayed as none. how do I correct this?
Typical Typo in your script. You have put faction into the family method.
ok. I corrected the problems. changed the def for Influence to @Influence = val instead of Age * val. it was muliplying the val assigned to $Roman_Leader.Influence again. corrected the fact that Age and Influence were strings, and assigned them as numerical numbers in initialize.

So I would like to add some windows to the game, before I work on the Data Manager end of loading and saving, so I can see how things play out with scripting.

Think anyone can help make a window for diplomacy that looks something like:

diplomacy window outline.png

it's pretty basic. the idea is there is a list of factions at the top half of the half for lists. selecting that item brings up appropriate information in the display half of the window on the left. I don't have cultures done yet, but I would like to work with what I do have, so I can help the team member that is a coder, and unfamiliar with ruby, see how some things are done.

any help is welcomed. I'm not asking that you do the work for me, maybe talk me through making the code.
so it has been over 76 hours, and I apologize in advance for not updating sooner. also sorry people if this is thread necromancy.I have found a master for which I may apprentice, in terms of ACE RGSS3, which is nice. it does not involve me doing work for him, but him helping me structure and script things specific to this sort of thing.Some new features are going to be added which are different from the OP, such as generated NPCs. The structure has been redone in the manner of which ACE already handles certain objects, or possibly improves upon those ideas.





so there was an issue with posting the script with the code function, so I had to pastebin it.

Anyways, that is the progress I have made recently. I think it is much better organized and offers a greater deal of functionality so far.

Original thread: https://forums.rpgmakerweb.com/threads/customizable-script-request-alliances-amongst-factions.44695/