Jump to content

Campaign summary/Journal


tracktwo

Recommended Posts

Zyxpsilon listed this in the "LW projects" thread and the new roster export mod posted on reddit yesterday gave me some more ideas on this, so I'd like to start a new thread here to flesh out some ideas.

 

Yesterday I wrote a proof-of-concept patch that records shot information into the game journal. The journal is just a big list of strings that records "interesting" events that occur in the game. As far as I know, this journal is never actually read by anything, but it's implemented in the same place as the game statistics are recorded (e.g. days til first colonel, days til first firestorm, etc.). My proof of concept patch records a line for each shot - who took the shot, the percentage chance, whether it hit or not, crit or not, and the target. That's just a first sketch, lots of things can be recorded here as the object that does the recording can be accessed from anywhere in the game.

 

It currently looks like this:

RollToHit: actor="Masako Ishikawa" chance=94 hit=True crit=True damage=9

Note: it needs to have the target name listed there too, but I haven't added that yet. Also can show the weapon used.

 

This sort of information is interesting to build up a form of AAR per mission, but accessing it and processing this data from within the game would be very tricky. The data are available, but per-shot information among other things will generate a ton of data and aggregating this data and analyzing it from unrealscript, especially hand-modded hex codes, would be veeeery tedious. I was imagining more of an offline or web-based tool that you can use to visualize this info or do some rudimentary mission replays.

 

What do you all think? Any other ideas on this?

 

 

Link to comment
Share on other sites

  • Replies 176
  • Created
  • Last Reply

Top Posters In This Topic

Ideally, this sort of "Data processing" could be integrated as an ingame device that would somehow become the statistical feature(s) i'm currently brainstorming various concept principles about.

The coding itself (i'd have to agree) should be daunting indeed. HUD stuff has never been easy... but there's still some hope yet, as proven by what XMTS could achieve with many UI gimmicks (Satellite Bonuses & Deployment - comes immediately to mind, btw).

 

The essential of "Campaign Summary" can be defined as Calendar-Tracking of Missions; think of it as a persistent Save-Load screen where all info (and Map images, etc) remains as stacked strings that gets transfered into a post-function on some alternate Situation-Room placeholder and its drop-down lists. For example... there *IS* something already being done to the Holographic flat geo-world in a number of ways; tiny interceptors, UFO red blips, Exalt symbols flashing away when cells get revealed, etc. By extension, Dotted numeric references (shapes & colors) could be used to create a visual overview of monthly (or more) events simply assembled onto the HOLO background.

 

If you can provide the addressable "resources" (whatever suits you best) to a core function at run-time -- it becomes almost trivial (for a skilled coder) to deploy anything on the UI for people to inspect at will.

 

Keep us informed of your progress... i'm very interested by any results you'll obtain.

 

;)

Link to comment
Share on other sites

I did a little poking around in the situation room map UI and it's populated more or less like the radar was for the motion tracker. E.g. the logic says "put a _hq icon at pos (x,y)" to show the XCOM HQ, or a _jet icon for an interceptor, or a _ufo for an active UFO, etc. All this UI is defined in UICollection_Strategy. So that can all be borrowed for other purposes, sort of like the radar was. Defining new sprites is kind of a PITA though.

 

The timeline for the strategy layer is already basically recorded by the game. Each mission is recorded, along with whether it was successful or not and the list of soldiers that went on it, each of their equipment (primary weapons only so far) and their end of mission HP, what resources were obtained, and what aliens were on the map (excluding dropins). There are similar entries for completing research and projects, buying and selling stuff, etc. This would make a pretty decent high-level timeline of the campaign, although the individual details of the tactical battles aren't there.

 

One thing I was wondering about UI-wise is if it'd be possible to overlay a brand new UI over the existing one via a brand new package and some new unrealscript hooks. Tying new packages into the game was already done via the mutators, so this isn't too unrealistic in general, but I don't know yet how the UI would interact. Defining new sprites then becomes easy, it's just flash authoring. If those can be baked into a .upk like the voice packs were baked into the new custom voice packages, it might be possible to get the game to display the normal situation room map ui and some of the "standard" controls, and then overlay on top of that a bunch of new custom UI elements, e.g. sprites to represent the timeline. I'm going to investigate this a little bit next. If that can work, certain UI edits might become much easier.

Link to comment
Share on other sites

That Radar is full of interesting tiny symbols, btw.

 

It wouldn't be much harder to provide a specific set of dedicated assets (inspired by these Radar elements... triangle, squares, circles, multiple-colors, etc) for an alternate "Summary+SitRoom" hybrid screen with anything necessary to display various functional components. The overall concept would need to be fleshed out a lot deeper though, as anyone assigned to produce a reasonable UI for those can't really manage the process without solid decisions. I'd be willing to work on a quick mock-up of the essentials while i'd certainly to be opened to everybody's suggestions for additional assets.

 

I dunno if the UnReal-Scripting methods and packaging everything towards some custom UPK would be feasible but i highly suspect it should be fine. Of course, somebody with the proper skills and knowledge of such tricky HUD principles would have to collaborate with you and us... XMTS comes to mind for reliable technicalities if anything. As to actually perform such tasks, somebody will surely have to commit time and formal code creativity.

 

The general idea for a rational "Situation Room" screen (both in size and appearance) can be seen through the Finance option. If you toggle the UI off, you'll see that tight display in action. It has very good proportions, ample room in surrounding areas to insert a variety of buttons, lists & what else. In fact, this *IS* the exact format i'll be using to present the concept phase to you or anyone else interested.

 

(EDIT; see below for a blank version of 960x540 -- half of my current screen resolution)

 

 

http://s4.postimg.org/6dnwg0sfh/Situation_Room_Blank.png

 

Then... some examples of possible HUD elements;

 

1) 16 countries slots or 12 months in a year. Re-use the very same "Panic bar" system and re-purpose their squares as selectable shortcuts to events and missions.

 

2) Satellites, Defense shields, Fundings -- lots of potential.

 

3) The bottom section has a panel of six locations. Continents?? And a Worldwide "button"??

 

4) The central holo map could even be switched to a "Globe geoscape" (( remember the F# that changes its focus to continents? )) Zooming straight to countries. The setting phase Bonuses are a great inspiration to that kind of a feature adapted for Summary scans.

 

5) Plenty more!

 

 

 

I'll just have to create the stuff and put a sample image of it all right here once ready for "analysis" by people (project involved). Gimme about a week!

:wink:

Edited by Zyxpsilon
Link to comment
Share on other sites

Sounds good!

 

So this happened today:

 

 

 

http://i.imgur.com/g12KYOT.jpg

 

 

 

 

The blue box is not post-processing, it's a flash "movie" that I injected into the map during the game.

 

Hello overlays! There is still a lot more that needs to be done here, but that's the first proof of concept at least. What remains to be seen is how much information I can get between my streaming map and the official map. Right now the movie is just triggered on a delay: 10s after the level loads it plays the movie (read: drops a blue rectangle over the view). This can do anything flash can do, including interactive UI elements and scripting. But right now I only have a very limited mechanism to trigger the flash through kismet. If I can programmatically stream a "level" from uscript, that'd basically do it. I think :smile:

 

The best part? All of that flash stuff is done through a real flash environment, then cooked into a map with a little bit of kismet in the UDK. No hex modding needed for the flash bit itself. Hex modding will still be needed to get the game to trigger this new component, though.

Edited by tracktwo
Link to comment
Share on other sites

Hey... cool gimmick!

It reminds me of the "ShowCursorLoc" console call which displays various data straight up to the Tactical layer. But if you can manage such direct box and then fill it up with relevant details... the more reasons for additional elements tackling to attach in such a solid work-bench.

I can only imagine how much potential this very simple Flash-Drop-Zone should offer at runtime. It *IS* a great development step no less.

Keep it up! :wink:

 

I have also started developping the basic Mockup for the "Summary Hybrid" screen(s)... here's a very early result which still needs a lot more precisions. The panic boxes need to be drawn as rational symbols for example; three tilted green bars for three abduction missions -- and so on.

 

 

 

http://s11.postimg.org/yeyytc8kz/Basic_Mock_Up1_sample.png

 

Some quick thoughts about the above...

 

1) 12 months are available. Leaving us with four extra "Data Block" spaces to deal with. One has been tagged for "TOTALS" while i think the "AUTO-SWITCH" could allow year pagination.

 

2) Green=Abductions -- Cyan=UFOs -- Yellow=Exalt -- Orange=Council -- Red=Terror -- Grey=Bases...

as shown by their Icons (maybe as clickable shortcuts) at the bottom.

 

3) Global and Five Continents further below.

 

 

 

So far, so good! :D

Edited by Zyxpsilon
Link to comment
Share on other sites

The steps are as follows:

 

1. Create the flash movie. I used a trial version of Flash Professional but someone else might be able to point us to some cheaper/free-er alternatives if any exist. I just created a basic .swf with just the blue rectangle, but as I said earlier this can be arbitrarily complex.

 

2. Open the UDK and create a new level using the empty template. Import the .swf you created (I got a dialog insisting that the .swf to import be somewhere under UDK\UDKGame\Flash\ for it to work, so that's where I put it. Open up the kismet editor and add some nodes. I used a "Level Loaded" node with the "Level loaded and visible" pin connected to a "Delay" node with a delay of 10s. This was connected to a "Open GFx movie" node. Select the imported .swf in the content browser and then In the properties panel for the movie node click the green arrow beside the "Movie" property to assign the movie.

 

3. Cook the map (add the map to the list of maps in the front-end) first.

 

4. Copy the resulting cooked map into the xcom cookedpcfolder. Be sure to rename it! By default the udk names it MapName.udk, you need MapName.upk.

 

5. Add the map to the streaming maps array in defaultmaps.ini for the map you have a save ready for. You may need to actually re-start the mission or start from a geoscape save to get it to work. After the level loads it'll run the sequence, including the delay and then the movie play. With just that simple node setup it will never hide the movie again, though.

 

Since that last post I've also tied this into streaming the map programatically from the strategic layer. It looks like this:

 

 

 

http://i.imgur.com/0M7B6M3.jpg

 

 

 

To get this to work I modified XComStrategicGame.XGSituationRoomUI, the UpdateMainMenu and OnChooseMainOption functions. OnChooseMainOption invokes XComMapManager.AddStreamingMap to load the map I created. There's also a RemoveStreamingMapByName function. I haven't hooked that up yet, though.

 

The next big thing I'm going to look at is how to pass data between the main map and the streaming map so the new custom flash can actually communicate with the rest of the game.

 

EDIT:

 

I managed to get further with this, and believe I can copy data back and forth between the streaming map Kismet and the game. Basically to do this I created a new action class to bridge between Kismet and the XCom unrealscript. This class (actually, two classes) reads the journal info from the recap class and makes it available to kismet. Then I need to propagate this into the flash movie, and this is where I'm getting stuck.

 

I'm definitely a flash noob, so I have no idea what I'm really doing here. There is also the slight problem that this version of the UDK only appears to support ActionScript 2.0 (the new version of Scaleform that supports 3.0 wasn't added to the UDK until the November 2011 release, apparently). And the new version of Flash from Adobe no longer supports AS2.0! It does still seem to read the flash file I created with the new version correctly - at least it plops down the blue rectangle - but I don't yet know if I'm creating the scripts correctly yet or if there is just some fundamental script incompatibility. At any rate the scripts I wrote don't look like the script packages that are in the SWFs in the xcom upks.

 

I need to spent a little bit of time learning me some Flash, I guess. If anyone has some expertise here and is willing to help out please let me know :smile:

Edited by tracktwo
Link to comment
Share on other sites

Wow... i really enjoyed seeing that new "Campaign Summary" menu option. It somehow proves integration of such a cool feature isn't that far off into the future. Let's hope "LW-Pedia" will be just as easy to implement - eventually.

;)

 

PS; Liquid, well it surely looks like somebody could find proper use for this kind of stuff. :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...