View Issue Details
|ID||Project||Category||Date Submitted||Last Update|
|0023059||AI War 2||[All Projects] Note To Test||Mar 25, 2020 7:16 pm||May 26, 2020 3:05 pm|
|Product Version||2.012 Populous|
|Fixed in Version|
|Summary||0023059: Journal thing for Chris|
|Description||"One is just a very simple data thing of two tables:|
Someone wanting to have an event in game would pull a random entry from a category, and write it to the log.
So a relic is discovered, and it calls the RelicDiscovered category and writes one of 10 random things: "Oh look, we found some sort of mysterious alien artifact, etc!"
If they want, they can make FirstRelicDisocovered and it only has a couple of items.
And they might have RelicsAfterCitiesMade and it has more entries.
So that it seems more sensible what is written.
Some of them might reference a person or a place or whatever, but it wouldn't be any sort of permanent cross-game log. Just stuff going into the log itself during a game.
Then there is the OTHER thing which is kind of like a bestiary/wiki for lore in game."
"The journal stuff just gets sent like chats and put to the chat log."
|Tags||No tags attached.|
Further notes from discord:
RocketAssistedPuffinToday at 3:22 PM
I don't recall journals being in chat
I'm doing a coop with Demo and StarKelp and it's not in chat
-NR-SirLimboToday at 3:23 PM
Yeah, I thought journals had their own menu point back in AIWC, or am I wrong?
RocketAssistedPuffinToday at 3:23 PM
OvalcircleToday at 3:23 PM
-NR-SirLimboToday at 3:24 PM
In my opinion, something that the player can re-read if they need to without having to scroll through pages upon pages of chat would be nice
Yeah. They had their own menu mixed in with other menu points.
Chris McElligott ParkToday at 3:27 PM
Huh! Well okay then.
That was after my time.
Originally circa AIW 4.0, they were just in chat.
Keith must have done this sometime 5.x or after.
RocketAssistedPuffinToday at 3:28 PM
If 5.x was Ancient Shadows (expansion 4), then I'd imagine so
That one is very heavy on journals.
Chris McElligott ParkToday at 3:28 PM
Do the journal entries show up at some point in the chat message, like "new journal entry available" or something like that?
RocketAssistedPuffinToday at 3:29 PM
Not in SP or MP
They show up in the top left
In the little box that says things like "Incoming Exo" or "Incoming Wave"
Chris McElligott ParkToday at 3:29 PM
There's like a... "5 unread journal messages" or something?
RocketAssistedPuffinToday at 3:29 PM
Not that exactly
but if you do have an unread one it shows up there
like "Shattered Pillar Found! (Click to read)"
Chris McElligott ParkToday at 3:30 PM
Ah, I see.
-NR-SirLimboToday at 3:30 PM
Here, upper left corner
Chris McElligott ParkToday at 3:30 PM
Well, we could use our own notifications thing for the same purposes.
Got it. Okay, yeah. That's a pretty different design but not something that is hard for us to mimic.
Apr 10, 2020 3:32 pm
20161107001824_1.jpg (55,810 bytes)
20161107001824_1.jpg (55,810 bytes)
-NR-SirLimboToday at 3:31 PM
I think I'll want to do some. But we would need "triggers" for this to work
Like XML Tags:
So for what I imagine is possible, the easiest way is creating a pseudo-options-menu-structure that can have entries added midgame, either in C# or through XML tags.
This would enable all the functionality for event chains and quests
Chris McElligott ParkToday at 3:33 PM
I was originally planning on having this be basically a thing where you could say "show a random journal entry from this category," where each category has 1-n entries in there so it's not identical every playtrhough. You might just have one entry in a category, but the game would remember which one it was if there were multiple. That way you can have things play out a bit differently each time. But then the actual code that says "draw a thing from a category" was something I was largely thinking of making it be based less on xml and more on just code, such as when you found your first spire city or whatever else. More abstract things. That's kind of how the AI taunts work. But we could certainly tie them to specific units without much trouble.
-NR-SirLimboToday at 3:38 PM
I would suggest adding them somewhere in the side-bar. This way they could be accessed with one click
In theory what here is the turrets, other defenses and such could indeed be individual buttons for journal entries that pop up with a similar window to how C-clicking and a number of other things appear.
This might be even less work.
Apr 10, 2020 3:41 pm
unknown.png (465,636 bytes)
Chris McElligott ParkToday at 3:42 PM
I don't remember if on all aspect ratios there would be room for that. Depending on your aspect ratio, the tabs go further or less far down the screen. And depending on your UI scale. The default UI scale is I think maybe 0.8 or something instead of 1, so maybe there is now room for everyone. I will have to verify that at some point, but assuming that is correct then I do prefer the idea of this being over there, yes.
Some XML triggers that I came up with just brainstorming:
These are in variants of:
Then are connected to:
so in total 3x19=57 triggers, like
that are 90% copy&paste&mix of one another
Like show_specific_journal_when_first_discovered_by_player="AIOverlordDiscovered" -> Displays a journal to the player with the "Oh, you've found the main AI controller. Go destroy that to win the game" kind of thing.
||Thank you for the list! That will be helpful.|
So, here's some useful functions when it comes to Journals. I'd probably implement them the same way that Hacking has functions that can be overwritten. The Context passing might be a good idea simply if spawning or similar events have to take place:
doOnJournalFirstQueued(Context context) ---> Executed the first the journal is queued. Will only ever execute once, even if the journal can occur multiple times
doOnJournalQueued(Context context) ---> Executed whenever the journal is queued. Can occur multiple times per game, but only if the journal can occur multiple times
doOnJournalOpened(Context context) ---> Executed whenever the journal is opened to be read by the player, just before the text is displayed
doOnJournalClosed(Context context) ---> Executed whenever the journal is closed
* Added a major new framework to the game to support modders in particular being able to subscribe to various events that might happen.
** Each hook is defined in GameData\Configuration\ExternalCodeHook, or optionally in equivalent folders for expansions or mods themselves.
*** As we did with the expansion external data, however, we might wind up keeping the expansion ones with the base game for simplicity. That may keep mods in particular as compatible as possible.
** Each hook has a name, which is what event handlers reference.
** Each hook has a description which explains what the heck it is for, in terms that a modder or another developer will hopefully understand. These are not ever seen by players.
** Each hook has a mainobject_is, which defines for the modder what type the "MainObject" parameter will be (so they can cast to that from type object).
** Each hook has a secondaryobject_is, which defines for the modder what type the "SecondaryObject" parameter will be (so they can cast to that from type object).
** Each hook has a additionalobjects_are, which defines for the modder what the heck is in the "AdditionObjects" array parameter (this can be an array of unlike type objects, or a list of multiple of the same type of objects, or more commonly just a null array).
** Each hook has a context_is, which defines for the modder if there is anything unusual to know about the ArcenSimContextBase that is being passed in.
*** Generally speaking there is nothing to say, but sometimes it will always be null, for instance. It will also generally be something you want to cast to ArcenSimContext from ArcenSimContextBase, but we define it as ArcenSimContextBase so that we can call this even from the ArcenUniversal dll.
* Event handlers are defined in GameData\Configuration\ExternalCodeHookHandler, or the equivalent folder for expansions or mods.
** These would typically be what people are actually modding in, rather than adding actual hooks (unless their mod is that huge).
** These just define the dll and class names of the handler, and then the hook that they are attached to, and a name that needs to be unique but doesn't get used for anything.
** It's worth noting that every time a hook handler object is defined, it instantiates a new copy of it that object. So if four different handler entries in xml all reference the same class, there would be four objects of the type of that class. You CAN store permanent data on those, but it's not recommended in most cases. You also can do something like define a static Instance variable to try to have a singleton pattern, but if more than one xml entry calls the same class, you'd have three classes not properly referenced, and then the static Instance pointing to the last-instantiated version. So a static List<> or similar would be better.
* Four hooks have been added to start:
*** Executed the first time a specific final journal entry is queued. Will only ever execute once, even if the journal can occur multiple times.
*** Executed whenever a journal entry is queued. Can occur multiple times per campaign, but only if the journal can occur multiple times.
*** Executed whenever the journal is opened to be read by the player, just before the text is displayed.
*** Executed whenever the journal entry is closed.
** Al of these are related to journals, as you may notice, but overall the functionality of hooks is unrelated to journals. It can be used for many different things in the future, but this is just what it happens to be first used for.
Thanks for suggesting these four events and thus inspiring the whole new hooks system! :)
I have provided example usages in there.
||Oh, and I've tested and all the hooks do work.|
Hey Chris, would you be willing to make some Journal entries for things that are Lore-important to the game? For example, maybe a Journal entry at the beginning of the game, when you claim your first Ark, first Golem, first time you see the AI Overlord... stuff like that? I think stuff like that is important, but they feel sufficiently fraught with Lore stuff that it would probably be best for you to tackle it.
Plus examples will make it easier for modders.
Sure, I think that does make a lot of sense. If there are other examples of where you'd like to see lore pieces come in, then I'm all for hearing about it. I don't mind putting in some stuff that will be good thematically for people in particular, and I still have some more journal hooks that are needed.
I've also been thinking about ways to try to incorporate knowledge of potential alternative victory conditions at game start, aka from the fallen spire, but I can't think of exactly the best way to do it. I can think of a SIMPLE way, but it's a lot less efficient. I think that modders will inevitably wind up using the simple approach, so I've been thinking I will just make that more efficient with an extra data structure that quickly can do that sort of check, and then not worry about it.
Journals are both a way of A. imparting Lore/background/depth to the world and B. also as a teaching tool.
Possible example: when the first Golem is spotted, have a small Journal entry talking about the Zenith (what your science/history officer might know), and pointing out that claiming the Golems would give the player powerful tools against the AI. Same sort of thing with the Arks (you'd need to invent some backstory though).
Another example: When certain unique and powerful AI things are discovered (the Superterminal? Those new Fleet enhancer things?) giving a journal entry with something like "It looks like this structure might be a way to interface directly with the AI's internal network and cause chaos, which would lower AIP. It might have a very powerful response though, so we would probably need to have a significant force (and maybe even build some turrets)" might be good.
Foreach Golem, give a bit of Lore/detail when captured. Could even just be something as minor as "Commander, this Zenith Golem is <describe the visuals>, and looks like it might be really good at <whatever it does well>. These ancient Golems are <positive adjective>!"
Foreach Ark, give a bit of Lore/detail when captured.
Foreach spire city built, give some Lore.
A journal entry when the first CPA and wormhole invasions are detected, giving some lore and mechanical explanation.
We also should get some Lore/gameplay description for the minor factions at either game start time, beacon invocation time or "when you find them on the map" time.
Agreed on all the above.
If you guys want me to write some of these, I'd be down for that.
|Mar 25, 2020 7:16 pm||RocketAssistedPuffin||New Issue|
|Mar 25, 2020 7:16 pm||RocketAssistedPuffin||Status||new => assigned|
|Mar 25, 2020 7:16 pm||RocketAssistedPuffin||Assigned To||=> x4000Bughunter|
|Apr 10, 2020 3:32 pm||x4000Bughunter||Note Added: 0056774|
|Apr 10, 2020 3:32 pm||x4000Bughunter||File Added: 20161107001824_1.jpg|
|Apr 10, 2020 3:33 pm||x4000Bughunter||Note Added: 0056775|
|Apr 10, 2020 3:36 pm||x4000Bughunter||Note Edited: 0056775||View Revisions|
|Apr 10, 2020 3:41 pm||x4000Bughunter||Note Added: 0056776|
|Apr 10, 2020 3:41 pm||x4000Bughunter||File Added: unknown.png|
|Apr 10, 2020 3:42 pm||x4000Bughunter||Note Added: 0056777|
|Apr 10, 2020 3:59 pm||NRSirLimbo||Note Added: 0056778|
|Apr 10, 2020 4:23 pm||x4000Bughunter||Note Added: 0056780|
|May 19, 2020 4:48 pm||NRSirLimbo||Note Added: 0057036|
|May 19, 2020 7:00 pm||x4000Bughunter||Note Added: 0057049|
|May 19, 2020 7:00 pm||x4000Bughunter||Note Added: 0057050|
|May 22, 2020 1:19 pm||x4000Bughunter||Note Added: 0057101|
|May 22, 2020 1:19 pm||x4000Bughunter||Note Added: 0057102|
|May 26, 2020 2:50 am||BadgerBadger||Note Added: 0057123|
|May 26, 2020 3:05 pm||NRSirLimbo||Note Added: 0057131|