wghost81 Posted May 8, 2014 Share Posted May 8, 2014 (edited) After playing with LW, I realized it absolutely needs map info to properly select your squad. I don't know how far Amineri advanced her research in this field, so I'll just post everything I know on the subject here. Maps are selected with XGGeoscape.DetermineMap function. It uses native XComMapManager.GetRandomMapDisplayName function to get random map display name (that's why display names must be different!), based on mission type, time, region and profile history. This function is called after squad selection is completed. For each mission GEOSCAPE().AddMission(kMission) is called where mission gets added to m_arrMissions array. Since m_arrMissions is of XGMission type and all the info is known at this point, I think, DetermineMap can be called from inside AddMission. This will set map name string and map execution command. Map name string can then be used to post a text note with map "clues" in lower left corner where all the other notes are posted. Clues have to be added as localized strings and somehow mapped to possible m_strMapName values. Technically, Unreal Script has 'map' data type, but for the testing purposes the whole m_strMapName can be posted as a note. And if this will work, we can think about handling "clues". Edited May 8, 2014 by wghost81 Link to comment Share on other sites More sharing options...
Amineri Posted May 8, 2014 Share Posted May 8, 2014 This is definitely something on our "Projects and Ideas" list for Long War : - Pick a map before mission launch, rather than after. Instead of giving away the precise map, give them some basic information on the dropship screen, particularly the size (relative to other maps). e.g. "Combat Area of Operations: Close Quarters." Possibly find a way to tamp down alien squad size on tiny maps. This is the quote from the sticky post that JL maintains with the list of "gee, this would be nice" stuff. Maybe someday we'll get to such things, but certainly any help we get just makes life easier :) Link to comment Share on other sites More sharing options...
wghost81 Posted May 9, 2014 Author Share Posted May 9, 2014 Sticky post are only sticky if you view them from site interface. Unfortunately, they're not sticky in forum topics. Anyway, if you're not working on it right now, I will try to do some tests. Link to comment Share on other sites More sharing options...
Amineri Posted May 9, 2014 Share Posted May 9, 2014 Nope, my current project is to allow configuration (via DefaultGameCore.ini) of adding Mobility modifiers to Weapons, as well as things such as DR to Armors. And once that is done to try and figure out how to use existing models with non-proportional scaling to create new items (e.g. foreshortened Sniper Rifle as Scout Designated Markman Rifle). And my background side-project is adding additional Council and non-Council cities, as well as pondering ways to incorporate non-Council cities as an actual gameplay element. So please, feel free to go to town on figuring out how to preview map information in the Squad Select UI. Link to comment Share on other sites More sharing options...
wghost81 Posted May 10, 2014 Author Share Posted May 10, 2014 (edited) Did it: http://i.imgur.com/NGucypl.jpg Here's PatchUPK mod file: UPK_FILE=XComStrategyGame.upk OBJECT=XGChooseSquadUI.LaunchingMission [FIND_CODE] //GEOSCAPE().DetermineMap(m_kMission) 19 1B <GEOSCAPE> 16 14 00 <NullRef> 00 1B <DetermineMap> 01 <@m_kMission> 4A 16 [MODDED_CODE] //remove DetermineMap call 01 <@m_kMission> 01 <@m_kMission> 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B OBJECT=XGGeoscape.AddMission:AUTO [BEFORE_CODE] //UpdateUI(0.0) 1B <UpdateUI> 1E 00 00 00 00 16 //return kMission.m_iID 04 19 00 <.kMission> 09 00 <XGMission.m_iID> 00 01 <XGMission.m_iID> [AFTER_CODE] //UpdateUI(0.0) 1B <UpdateUI> 1E 00 00 00 00 16 //DetermineMap(kMission) 1B <DetermineMap> 00 <.kMission> 4A 16 //PRES().Notify(1, kMission.m_iID, , ); // temporarily using eGA_Abduction for all alerts 19 1B <PRES> 16 17 00 <NullRef> 00 1B <Notify> 24 01 19 00 <.kMission> 09 00 <XGMission.m_iID> 00 01 <XGMission.m_iID> 4A 4A 16 //return kMission.m_iID 04 19 00 <.kMission> 09 00 <XGMission.m_iID> 00 01 <XGMission.m_iID> OBJECT=XGMissionControlUI.AddNotice:AUTO [BEFORE_CODE] //default: 0A FF FF //if(m_arrNotices.Length == 0) 07 F2 16 9A 36 01 <@m_arrNotices> 25 16 //m_arrNotices.AddItem(kNotice) 55 01 <@m_arrNotices> 0A 00 00 <.kNotice> 16 //goto J0x1709 06 09 17 //m_arrNotices.InsertItem(0, kNotice) 57 01 <@m_arrNotices> 0B 00 25 00 <.kNotice> 16 [AFTER_CODE] //default: 0A FF FF //if(eNotice == 1) 07 90 17 9A 38 3A 00 <.eNotice> 24 01 16 //kNotice.txtNotice.StrValue = GEOSCAPE().GetMission(iData1).m_kDesc.m_strMapName 0F 35 <XComGame.XGTacticalScreenMgr.TText.StrValue> <XComGame.XGTacticalScreenMgr.TText> 00 00 35 <XGMissionControlUI.TMCNotice.txtNotice> <XGMissionControlUI.TMCNotice> 00 01 00 <.kNotice> 19 19 19 1B <GEOSCAPE> 16 <%s 19> <XGGeoscape.GetMission.ReturnValue> 00 1B <GetMission> 00 <.iData1> 16 09 00 <XGMission.m_kDesc> 00 01 <XGMission.m_kDesc> 09 00 <XComGame.XGBattleDesc.m_strMapName> 00 01 <XComGame.XGBattleDesc.m_strMapName> //kNotice.txtNotice.iState = 4 0F 35 <XComGame.XGTacticalScreenMgr.TText.iState> <XComGame.XGTacticalScreenMgr.TText> 00 00 35 <XGMissionControlUI.TMCNotice.txtNotice> <XGMissionControlUI.TMCNotice> 00 01 00 <.kNotice> 2C 04 //if(m_arrNotices.Length == 0) 07 B9 17 9A 36 01 <@m_arrNotices> 25 16 //m_arrNotices.AddItem(kNotice) 55 01 <@m_arrNotices> 0A 00 00 <.kNotice> 16 //goto J0x17D0 06 D0 17 //m_arrNotices.InsertItem(0, kNotice) 57 01 <@m_arrNotices> 0B 00 25 00 <.kNotice> 16 I can confirm it also gets saved when you save the game at this point. For testing purposes I'm just posting the whole map description string via Notifications interface, but it can be changed. I think, it's technically possible to display map briefing images instead of fog pod image when choosing an abduction, but it can be less interesting when you know exactly what map it is. So, I'm thinking about displaying some clues instead. PS I'm still going to try to display map images, but I'm not UI expert, so I can't guarantee I'll get this one work. :smile: Edited May 10, 2014 by wghost81 Link to comment Share on other sites More sharing options...
johnnylump Posted May 10, 2014 Share Posted May 10, 2014 Well done! My intention for this is to display the information in the dropship room (when you are selecting the squad and equipping soldiers, and to come up with a way to translate the map name into a more generic description that can encompass several maps, so you can't memorize cues that will tell you exactly where you are going. Link to comment Share on other sites More sharing options...
wghost81 Posted May 10, 2014 Author Share Posted May 10, 2014 Thanks. Notifications are better for vanilla game with 3 simultaneous abductions. But, yes, for LW squad selection screen might be better. I tried to set imgBG parameter for abduction selection UI to different value, but it seems, it is just ignored and image is hard-coded inside action script. Need UI expert to figure this out, I guess. :smile: Text clues can be coded relatively easy. Map DisplayName (m_strMapName) string (which is currently displayed to test mod changes) is easily accessible and clues can be "coded" directly into it. As far as I can see there are two mandatory requirements for DisplayName format: first word must be equal to Name string and the whole DisplayName must be unique. I don't know why, but Name is not used directly, but gets extracted from DisplayName instead with command: mapPath = Left(kInfo.strMapName, InStr(kInfo.strMapName, " "))We can store clues or clue indexes inside DisplayName. For example: DisplayName="URB_Bar (Beta/Functionality Complete Urban Bar) :clue text here"It can then be extracted with command mapClue = Right(kInfo.strMapName, InStr(kInfo.strMapName, ":") + 1)But it's not good to have language-dependent strings inside config files. So, we can put clue number inside DisplayName instead: DisplayName="URB_Bar (Beta/Functionality Complete Urban Bar) :1"Then we'll need to expand localized strings array and add couple of new entries for all the clues. Several maps can have the same clues. Clue number can be extracted with the above code, converted to int and used to extract localized clue string. Link to comment Share on other sites More sharing options...
Amineri Posted May 10, 2014 Share Posted May 10, 2014 Notifications are better for vanilla game with 3 simultaneous abductions. But, yes, for LW squad selection screen might be better For vanilla game you only get to the Squad Select UI after selecting the particular Abduction Mission, so putting it in there (and reading it from the active mission) makes sense too. Although when choosing an abduction it would make sense to have some map info displayed with the abduction info so it can be weighed as a factor along with reward/difficulty/panic. Link to comment Share on other sites More sharing options...
wghost81 Posted May 11, 2014 Author Share Posted May 11, 2014 (edited) Clues can be posted as notifications in Mission Control and later as additional info on Squad Select screen. Mission information is accessible from both mission selection interface (UFO, abductions, EXALT missions, terror missions, Council missions too, but they probably don't need it, as they already have map clues in mission description) and squad selection interface. I will probably continue with raw DisplayName info displayed through notifications for each separate abduction (and other missions) and on Squad Select screen. After completed, it can be relatively easy changed to show clues instead of DisplayName. Edited May 11, 2014 by wghost81 Link to comment Share on other sites More sharing options...
wghost81 Posted May 12, 2014 Author Share Posted May 12, 2014 (edited) Map info on squad selection screen: http://i.imgur.com/EssIXxG.jpg "Map" will be replaced by something like "Tactical information:" and map name will be replaced by clue ("Close quarters", "Urban", "Roadway", etc). Working on mission selection interface now. Notifications are not good for displaying such an info and trying to post one while Geoscape is paused crashes the game anyway. So I decided to shift around some data to make place for map clue on abduction info screen. Edited May 12, 2014 by wghost81 Link to comment Share on other sites More sharing options...
Recommended Posts