[A12] BackstoriesCore Update 10

Started by mipen, March 26, 2015, 05:58:39 AM

Previous topic - Next topic

mipen

Quote from: isistoy on June 18, 2015, 01:41:04 PM
After giving a quick look to your work it would be of good use for Project K9 mod.

May we integrate your mod for our own specific backstories in there? We will give credits, of course.

That would help a lot actually: I could then put someone to work on it :)

Thanks in advance.
Yeah that's fine! I'd intended it to be a framework for mods to use to add their own backstories anyways. All you need to do is add the assembly as a reference in your project if you want to use its internal functions (there's not really much there, might look at adding a basic api in the future), and have the mod loaded before yours as a requirement. You can add the Defs directly inside your own mod defs folder

isistoy

Quote from: mipen on June 18, 2015, 11:17:14 PM
Yeah that's fine! I'd intended it to be a framework for mods to use to add their own backstories anyways. All you need to do is add the assembly as a reference in your project if you want to use its internal functions (there's not really much there, might look at adding a basic api in the future), and have the mod loaded before yours as a requirement. You can add the Defs directly inside your own mod defs folder
I mean, it's up to you: I can have your classes in there, it's not much of a problem. Or load the mod itself, with precedence, but it is a bit more work for structure. I don't intend to steal anything and would gladly give credits, in any case.
<Stay on the scene like a State machine>

nmid

Quote from: Devon_v on June 18, 2015, 11:03:31 PM
Wouldn't be hard at all. I might do that over the weekend if SCa11 doesn't get released.

that would be uber cool :p
I like how this game can result in quotes that would be quite unnerving when said in public, out of context. StorymasterQ

falcongrey

Quote from: mipen on June 18, 2015, 08:48:35 AM
@falcongrey
Hey there! Okay, so. Firstly, the folder structure is very important. Inside the Defs folder, you should have a folder called BackstoryDefs, and inside this folder is where you put your xml files defining your backstories. I can't remember if I put the templates into their respective folders inside the Templates.rar file, or if they are loose.

The CoreBackstoryDefs.xml file I am referring to doesn't come with the core mod anymore, it is in the core backstories package (I think the first one listed on the OP) my apologies for not changing that. I originally supplied it with the base mod but separated it out.

Anyways, to make your own backstory:
Open the Defs folder. If it doesn't already contain a folder called 'BackstoryDefs', then create it (make sure to get the name exactly right or the game will bug out). Now, extract the BackstoryDefTemplate.xml file into 'BackstoryDegs'.
Open this file with a good editor, at the very least something like Notepad++.
To get a term of reference, download one of the backstory packages linked in the original post, extract its contents to your desktop, and open one of the files inside its BackstoryDefs folder. This will show you the structure you should follow to write your own backstory. You could even copy and paste one of these backstories into your own file and just change the data.
Anyways, inside the template file, you will find descriptions of all the expected entries required to define your backstory. I'm writing this on my phone so I can't open it and go through it here unfortunately. But by cross referencing between the template and the other backstory, I am sure you will be able to work it out :)
If you need some more help, let me know and I'll try write up a full in depth tutorial when I get onto my computer next. Good luck! 

As an aside, I really do need to update the original post with a proper tutorial. You're welcome to try mucking up a program to help write the backstories, I was just thinking of doing something like that myself, truth be told

Ok, so trying to make sure I do this correctly here. If I am understanding the file structure correctly starting at the 'mods' folder it should be like this:
Mods ---> BackstoriesCore --|-->About --> About.xml
                                        |--> Assemblies --> Backstories!.dll
                                        |--> Defs --|--> BackstoryDefs --> BackstoryDefTemplate.xml
                                        |                |--> ConfigDefs --> Config.xml
                                        |                |--> NameDefs --> NameDefTemplate.xml
                                        |                |--> PawnBioDefs --> PawnBiosTemplate.xml
                                        |--> Textures --> Default.png
                                        |--> .gitattributes
                                        |--> .gitignore


Or should the .xml files for namedefs and pawnbiodefs all be in the backstorydefs folder too?
It matters not if we win or fail. It's that we stood and faced it.

mipen

Quote from: falcongrey on June 19, 2015, 09:04:42 PM
Quote from: mipen on June 18, 2015, 08:48:35 AM
@falcongrey
Hey there! Okay, so. Firstly, the folder structure is very important. Inside the Defs folder, you should have a folder called BackstoryDefs, and inside this folder is where you put your xml files defining your backstories. I can't remember if I put the templates into their respective folders inside the Templates.rar file, or if they are loose.

The CoreBackstoryDefs.xml file I am referring to doesn't come with the core mod anymore, it is in the core backstories package (I think the first one listed on the OP) my apologies for not changing that. I originally supplied it with the base mod but separated it out.

Anyways, to make your own backstory:
Open the Defs folder. If it doesn't already contain a folder called 'BackstoryDefs', then create it (make sure to get the name exactly right or the game will bug out). Now, extract the BackstoryDefTemplate.xml file into 'BackstoryDegs'.
Open this file with a good editor, at the very least something like Notepad++.
To get a term of reference, download one of the backstory packages linked in the original post, extract its contents to your desktop, and open one of the files inside its BackstoryDefs folder. This will show you the structure you should follow to write your own backstory. You could even copy and paste one of these backstories into your own file and just change the data.
Anyways, inside the template file, you will find descriptions of all the expected entries required to define your backstory. I'm writing this on my phone so I can't open it and go through it here unfortunately. But by cross referencing between the template and the other backstory, I am sure you will be able to work it out :)
If you need some more help, let me know and I'll try write up a full in depth tutorial when I get onto my computer next. Good luck! 

As an aside, I really do need to update the original post with a proper tutorial. You're welcome to try mucking up a program to help write the backstories, I was just thinking of doing something like that myself, truth be told

Ok, so trying to make sure I do this correctly here. If I am understanding the file structure correctly starting at the 'mods' folder it should be like this:
Mods ---> BackstoriesCore --|-->About --> About.xml
                                        |--> Assemblies --> Backstories!.dll
                                        |--> Defs --|--> BackstoryDefs --> BackstoryDefTemplate.xml
                                        |                |--> ConfigDefs --> Config.xml
                                        |                |--> NameDefs --> NameDefTemplate.xml
                                        |                |--> PawnBioDefs --> PawnBiosTemplate.xml
                                        |--> Textures --> Default.png
                                        |--> .gitattributes
                                        |--> .gitignore


Or should the .xml files for namedefs and pawnbiodefs all be in the backstorydefs folder too?
Yup, that is exactly correct! :) By the way, nice formatting!

mipen

Quote from: isistoy on June 18, 2015, 11:47:59 PM
Quote from: mipen on June 18, 2015, 11:17:14 PM
Yeah that's fine! I'd intended it to be a framework for mods to use to add their own backstories anyways. All you need to do is add the assembly as a reference in your project if you want to use its internal functions (there's not really much there, might look at adding a basic api in the future), and have the mod loaded before yours as a requirement. You can add the Defs directly inside your own mod defs folder
I mean, it's up to you: I can have your classes in there, it's not much of a problem. Or load the mod itself, with precedence, but it is a bit more work for structure. I don't intend to steal anything and would gladly give credits, in any case.
I really think it would be easier to just load the mod first. It means you don't have to mess around with any of the internal stuff and also you will get any updates/fixes/changes I do in the future without having to do anything. It will also be more compatible with any other mods that use it, like MD2Droids

isistoy

Sounds fine!

Just on time, as a matter of fact, as I just finished a new iteration on jobs and can do a bit of other things, like Backstories and Thoughts, now that I got some basics.
I plan to do this during the week-end and with the help of this topic, it should go nicely.

Thanks again
<Stay on the scene like a State machine>

AllenWL

Can we edit existing backstories with this?

nmid

Quote from: Devon_v on June 18, 2015, 11:03:31 PM
Wouldn't be hard at all. I might do that over the weekend if SCa11 doesn't get released.

That would be very awesome !!
I like how this game can result in quotes that would be quite unnerving when said in public, out of context. StorymasterQ

mipen

Quote from: AllenWL on June 20, 2015, 03:19:22 AM
Can we edit existing backstories with this?
Unfortunately no, there's no way to edit existing backstories outside of when the game is running,and even then it is very difficult

isistoy

ok,

this is now basically in for K9:



A few questions, if it's not abusing of your time:

  • can backstory skills also come from some that I define myself in the mod?
  • in a more general sense about skills, will new ones defined in a mod not also automatically apply to vanilla pawns? Can we constrain custom skills to custom pawns?

I appreciate your help, by the way :)
<Stay on the scene like a State machine>

AllenWL

#86
Um, Ok.. I installed this mod, and wrote a few backstories.
The moment I 'activated' the mod, the screen turned completely black, and now I can't play without removing it from my mods folder. The moment I put it back, the game gets a black screen again. Help?

Edit:
Ok, I fiddled with a few stuff, and after deleting the unused config, name, and pawnbio defs, the game does not get a black screen anymore.

Edit2:
Re-added the configdef, but for some reason, I cannot seem to find my custom made backstories in the game, not when using the EdB prepare carefully mod, and not when spawning tons of colonists, raiders, and slave traders and checking each one. Spawn catagories have been written

Edit3:
After deleting and re-installing the entire thing, the mod works... sorta. A few of the backstories are there, but a few aren't...
(Oh, and plant growing and cooking is considered skill labor, but art isn't?)

Edit4:
Ok, after fixing a bunch of spelling mistakes and such, it works now. Whew, that was hard.

Devon_v

#87
Quote from: isistoy on June 20, 2015, 04:52:37 AM
ok,

this is now basically in for K9:



Looks nice. Don't forget to use HIS (all caps) to have the game substitute "her" as appropriate. NAME could be used in place of "This dog" to make it automatically read as "Buster is quite well-tempered..."

HE also prints "he" or "she" by pawn gender, and HECAP capitalizes it if you're starting a sentence. Or writing a backstory for a deity.

Edit: "breed" is the word you're looking for.

isistoy

Ah, many thanks!
This is interesting meta: do we have an exhaustive list with all these Meta Words, somewhere?
<Stay on the scene like a State machine>

Devon_v

They're listed in the template files and the corebackstories.def.

HE, HECAP, HIS, HISCAP, AND NAME.