wghost81 Posted November 27, 2013 Author Share Posted November 27, 2013 (edited) cattlekiller, no floating point values won't work, because variables are of integer type. Theoretically, we can hijack some float variable from other function and rework calculation process, but this will require a HUGE effort and I'm not ready for it. I think, it would be easier to simply increase meld requirements for meld-related stuff. BTW, all values in custom mod are bytes and they have to stay that way. For example, if you want 5 meld you have to write "05" and if you want 200 — "C8", because you're changing 1-byte variable. Edited November 27, 2013 by wghost81 Link to comment Share on other sites More sharing options...
cattlekiller Posted November 27, 2013 Share Posted November 27, 2013 cattlekiller, no floating point values won't work, because variables are of integer type. Theoretically, we can hijack some float variable from other function and rework calculation process, but this will require a HUGE effort and I'm not ready for it. I think, it would be easier to simply increase meld requirements for meld-related stuff. BTW, all values in custom mod are bytes and they have to stay that way. For example, if you want 5 meld you have to write "05" and if you want 200 — "C8", because you're changing 1-byte variable.Thanks for the reply, and yes that is a much better way of doing what I wanted. Link to comment Share on other sites More sharing options...
zerothenumber Posted November 27, 2013 Share Posted November 27, 2013 Silly question... Can the hex value be 0? As in no meld from cyberdisks and drones? I get all other hex values like 13=D, 500=1F4, etc. Link to comment Share on other sites More sharing options...
wghost81 Posted November 27, 2013 Author Share Posted November 27, 2013 (edited) Silly question... Can the hex value be 0?Yes: 00. 500 is out of range. Max meld amount is restricted to 255 (FF), since this is 1-byte constant. Edited November 27, 2013 by wghost81 Link to comment Share on other sites More sharing options...
wghost81 Posted November 27, 2013 Author Share Posted November 27, 2013 BTW, does anyone knows how to remove string about meld objectives from Mission Briefing UI? It seems to use some ActionScript code to build the objectives text manager.ActionScriptVoid(string(GetMCPath()) $ ".SetObjectives") and I'm not an expert on this kind of things. :smile: Link to comment Share on other sites More sharing options...
XMarksTheSpot Posted November 27, 2013 Share Posted November 27, 2013 (edited) BTW, does anyone knows how to remove string about meld objectives from Mission Briefing UI? It seems to use some ActionScript code to build the objectives text manager.ActionScriptVoid(string(GetMCPath()) $ ".SetObjectives") and I'm not an expert on this kind of things. :smile:Can't check myself as I am at work right now, but this looks like one of the ActionScript-interfacing UnrealScript functions, probably AS_SetObjectives() or something along those lines. Typically those feature some parameters which are implicitly passed to the corresponding ActionScript function, I suppose one or more string parameters would be the case here. Have you looked around to make sure that the objective string isn't assembled via UnrealScript? As far as I can tell such details aren't typically done in the ActionScript portion of the UI - on the UnrealScript side there's the whole shebang with default string constants and localization stuff and whatnot. Speaking of which, if a full text search on some of the lines you see on the mission briefing screen yields no results, the strings are probably outsourced to some localization file, I guess. Edited November 27, 2013 by XMarksTheSpot Link to comment Share on other sites More sharing options...
wghost81 Posted November 27, 2013 Author Share Posted November 27, 2013 (edited) Thanks, XMarksTheSpot. Silly me. :smile: Never tried to search for the text itself. :smile: It's in the defaultproperties section of XGMission_Abduction, XGMission_UFOCrash and XGMission_UFOLanded. Well... I still don't know how to handle this. :smile: This is localization-specific, does it mean, I need to change corresponding text in localization files? Edited November 27, 2013 by wghost81 Link to comment Share on other sites More sharing options...
XMarksTheSpot Posted November 27, 2013 Share Posted November 27, 2013 Thanks, XMarksTheSpot. Silly me. :smile: Never tried to search for the text itself. :smile: It's in the defaultproperties section of XGMission_Abduction, XGMission_UFOCrash and XGMission_UFOLanded. Well... I still don't know how to handle this. :smile: This is localization-specific, does it mean, I need to change corresponding text in localization files?What parameters does the AS_SetObjectives() function (or whatever it is actually called, still can't check) have? If the text parts pertaining to meld are separate (e.g. as a parameter of its own or as an array element) you might be able to substitute it for an empty string before it's passed to AS_SetObjectives().If the Meld text is merged into the non-Meld parts (i.e. everything as one string) you might need to edit the localization files from which the text is pulled. I'm not sure how localization is handled in the game, the UnrealScript code features a lot of plain text string variables containing what we see in the English language version, might be that those get replaced at runtime using the corresponding localization files. Link to comment Share on other sites More sharing options...
wghost81 Posted November 27, 2013 Author Share Posted November 27, 2013 In XGMission_Abduction: defaultproperties { ... m_strObjective="<Bullet/> Neutralize all hostile targets\\n<Bullet/> Locate and secure Meld canisters" } In UIBriefing.StartBriefing ... AS_SetObjectives(m_strLabelObjectives, class'XComLocalizer'.static.ExpandString(kInfo.strObjective)); ... private final simulated function AS_SetObjectives(string Label, string Desc) { manager.ActionScriptVoid(string(GetMCPath()) $ ".SetObjectives"); //return; } m_strObjective is used to build localized string in XGMission.GetBriefingInfo (at least I think so): kInfo.strObjective = class'XComLocalizer'.static.ExpandString(m_strObjective); I'm not used to work with strings and UI, especially with localized ones. Especially in UE Script. I don't know if there is a way to split localized string at "\\n", for example. Or do this some other way from inside the script to make the change localization-independent. Link to comment Share on other sites More sharing options...
XMarksTheSpot Posted November 27, 2013 Share Posted November 27, 2013 I'm not used to work with strings and UI, especially with localized ones. Especially in UE Script. I don't know if there is a way to split localized string at "\\n", for example. Or do this some other way from inside the script to make the change localization-independent.There's a bunch of string functions available in UnrealScript, have a look here. Of note would be Split(), SplitString() or maybe ParseStringIntoArray() and JoinArray() if you want to get all fancy ;) No idea how this interacts with localized strings, maybe just try and see what happens? :) Link to comment Share on other sites More sharing options...
Recommended Posts