Jump to content

Mjjstral

Members
  • Content count

    110
  • Joined

  • Last visited

Everything posted by Mjjstral

  1. Really? I was not aware of a 64 bit version of the game... Are you very sure? Beside that, the patch version of the game doesn't depend on the binary files, only the .big and .skudef matters for that ? That's why you can still play 1.00 just by changing the entries in the skudef. Some people recommend the 1.07, as it seems to be more stable, although I never had trouble with 1.08 beside the unformated display of source code with the wrathed.exe big viewer. But you can decide for yourself, here is the changelog for 1.08: 1.08 - empty assets of the base stream are now hidden in BigView - hashes are passed through now instead of being compiled again - most attributes with standard values are now hidden in BigView - fixed compiling of asset type StringHash - added schemas for AptUI - fixed an error with imports in ProductionUpdate Download the xml source code for Kanes Wrath here and look in the folder meta game (meta game=global conquest mode). For the big files use the WrathEd.exe big viewer (tools folder) to see the xml code. There you can copy it.
  2. Mjjstral

    Trains and railroads

    It's still possible with a workaround: For the rails use a texture if necessary your own. Create a waypoint path on the rails and name the path. Then you place the object (train) that is supposed to move somewhere. The main step now is to make a script that enables the object to move. It's something like unit follow waypoint path "pathname". You could use the monorail train that already exists.
  3. Thank you so much for the countless hours and efforts you probably put into this mod. This mod needs more recognition.
  4. So I can give you a solution to these kind of problems in general if you don't mind dealing with the Meta Mod framework (or at least copy the necessary parts from it): Use a ScriptTimer: SetScriptTimer(EveryNSec,Action,Loops) whereby Action can be a function or string that gets executed every n seconds for Loops. If loops is -1 it means infinite loops. You can still delete an infinite loop script timer action manually with DeleteScriptTimerAction(Action). For the refinery solution you coud make a table in which each refinery registers itself. That table gets processed by a function that will then be the ScriptTimerAction. Since Meta Mod source and everything is available now I give you also a Meta Mod solution for our old approach with TiberiumCrystals: function GetNearestTiberiumCrytalRef(DevourerObject) ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", "TiberiumCrystalTypeList", "TiberiumCrystal") ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", "TiberiumCrystalTypeList", "TiberiumCrystalBlue") local TiberiumCrystalRefTable = GetObjectTypeListForTeam(NeutralTeam,"TiberiumCrystalTypeList") local CrystalPos = {} local CrystalRef = "" local DevourerPos = GetObjectPosition(DevourerObject) local LastDistance,NewDistance=15000,15000 for i=1,getn(TiberiumCrystalRefTable),1 do CrystalPos=GetObjectPosition(TiberiumCrystalRefTable[i]["ref"]) NewDistance=sqrt((DevourerPos.x-CrystalPos.x)^2+(DevourerPos.y-CrystalPos.y)^2) if NewDistance<LastDistance then LastDistance=NewDistance CrystalRef=TiberiumCrystalRefTable[i]["ref"] end end return CrystalRef end You can use that for the UseTibThiefSp(self,other) function I posted earlier, whereby other=GetNearestTiberiumCrytalRef(self). The crucial line eventually would then be this: ExecuteAction("NAMED_FIRE_SPECIAL_POWER_AT_NAMED",self,"SpecialPower_ConversionBeam",other) If something again goes wrong with the triggering, then use a ScriptTimer or insert a line into the "PeriodicMasterCheck" fuction (this function gets executed every 10 seconds to test all kinds of things in Meta Mod including victory conditions for custom gamemodes).
  5. There are several model conditions and object statuses related to garrsion. Model Conditions: "GARRISONED", "INSIDE_GARRISON" or "WEAPONSET_GARRISONED". Object Status: "GARRISONED", "INSIDE_GARRISON". Try to use one of these to trigger a lua event and for the lua function then use these: ObjectGrantUpgrade(object,upgradename) ObjectRemoveUpgrade(object,upgradename) ObjectHasUpgrade(object,upgradename) or these ExecuteAction("NAMED_RECEIVE_UPGRADE",object,upgradename) ExecuteAction("NAMED_REMOVE_UPGRADE",object,upgradename) EvaluateCondition("UNIT_HAS_UPGRADE",ObjectStringRef,upgradename) If e.g. the following doesn't work to trigger the removal: <ModelConditionEvent Name="UnGarrisoned"> <Conditions>-GARRISONED</Conditions> </ModelConditionEvent> ..then you can always use a Meta Mod ScriptTimer to test every n seconds ObjectTestModelCondition(object,modelconditionname) or ObjectHasUpgrade(object,upgradename) or try to use 2.9.3 from my guide I didn't look into an xml solution, so there might be another (maybe easier) way making it work on the xml coding side...
  6. Mjjstral

    Red Alert 3 Campaign Missions

    Open the .big file with FinalBig and simply drag and drop the extracted files back into the big file and overwrite if necessary. You can also change directory paths within the big file with FinalBig (Edit->Rename File).
  7. Thank you and yes everything should work in TW and even in RA3 and BFME2 too, the lua code is completely universal (except game specific object names in some tables of course) and big parts of the xml coding as well. Actually I'm considering a TW port someday. Edit: Not to confuse people, the bare lua code itself syntax wise will work in TW since both use Lua 4.0.1. But be aware that many core functions, like the positional spawner, GetObjectPosition and scripttimers depend on object dummys. But these objects can still be easily transfered to TW and other sage engine games, beside the possibility to just completely adopt the Meta Mod framework and turn everything unneeded of by simply setting some global lua variables to zero.
  8. I'm trying to add these files/codes to a mod with Wrathed 1.08: 1. InGameUISettingsCommon.xml (cause I need to change the text size, color and offset of military captions) 2. SkirmishAI xml code for a new faction: ArmyDefinition, OpeningMoves, Personalities, States ... I tried to reference the InGameUISettingsCommon.xml in Static.xml, MapMetaData_GlobalOverrides.xml, MapMetaData_Global.xml, none of these methods worked. The SkirmishAI xml's also doesn't work, referencing them in the Static.xml. Do I need to change the BuildMod.bat maybe? So if it isn't possible due to wrathed limitations, will we ever be able to use these files ? Is there hope for a new wrathed version ? If not what about the availability of the wrathed source code to add these capabilities on our own ? I highly appreciate any help!
  9. So you've created the AI definition files? Then put them to "WrattED\Tools\Definitions\Kane's Wrath" or any subfolder inside this path. (BTW can you share the def. files with us, I'm too busy finishing other edges of my mod) Use a life debugger: http://x64dbg.com/ Two more question from my side: 1. If we compile some xmls with the C&C3TW modsdk, and include the compiled .asset files into a KW mod with the asset merger from wrathed, how to ensure that it works correctly (I get hash errors when starting game with the mod then). 2. Also wouldn't it be possible to convert the C&C3TW modsdk xsd schemas to wrathed xml definition files? Missing entries could be added afterwards...
  10. Ok I've tried to also test and make a working solution for the xml part. Unfortunately I came across a strange behaviour: It seems that even if you force lua registration, the game prohibits the tiberium crystals from registering in the lua globals table. So if you use the event OnDamaged the custom tiberium crystal weapon trigger the event but on the lua part you get a hidden error cause it tries to call the object reference for the attacker which is not present, therefore also anything within the function won't get executed. Now the only solution I can think of now involves again large lua code segments and I'm not sure if the effort is worth it. It would work like that 1. Create an "alternative" object reference list with all tiberium crystals on the map. 2. Test the distance of each crystal with the devourer and based on that decide which one to choose.... Most of my algorithms use binary search but I'm not sure about the performance impact by using that way, because lua code doesn't get processed parallel. If you still decide to use that way send me your skype or something for better communication, thanks.
  11. Thank you Lauren! That was the decisive hint. Now I have created the whole asset definition for the InGameUISettings. Wrathed uses the file also and includes the AssetDeclaration to the mod but the game crashes during startup. Now I really need help to correct the errors. The order seems to be important, since data gets serialized? Also at some points I wasn't 100% sure what entry type to take. Here is the definition (http://pastebin.com/ikx8HENw)
  12. First, thanks for your response Prodigy That's interesting. So does that mean we can simply add a new definition file to the "WrattED\Tools\Definitions\Kane's Wrath" folder and wrathed will include it during compilation (or is it necessary to include a reference to the new def. file somewhere?) ? I mean I could just copy/paste syntax from other definition files and add the proper entries for the InGameUISettingsCommon.xml and AI files... Is it that simple?
  13. Wow, thank you so much Lauren. I will try to convert that to lua.
  14. Hey Lauren thanks for your input. I was always wondering about the hash algo. BTW would be nice to contact you in skype again ...
  15. That number can indeed differ from KW. Is there also a StringHashTable.xml somewhere in the TW assets? There you can find it. It occurs to me that you don't necessarily need the filter actually, cause only the devourer has the appropriate LuaEvent that activates the function. You can just comment it i would say. I didn't change the xml codes. I have methods to directly run and change lua code from a textfile next to my game window and execute it with a button live ingame. With that I artificially called the UseTibThiefSp(self,other) function with a reference of a tiberiumcrytal and from a devourer I spawned... If you really get stuck on the xml part I may also help you there if I have more time. Yes I would say that's the case. But you can try ObjectSetObjectStatus(self,"NO_COLLISIONS") if the moving is caused by the crowdedness of other units around. One more helpfull thing: For an easy way of debugging the lua code: ExecuteAction("SHOW_MILITARY_CAPTION", "DEBUG_POINT_X", 5) This shows the message "DEBUG_POINT_X" for 5 seconds. Put it between the lines in the lua code with ascending index x and see where it gets stuck in the UseTibThiefSp function. With that you can also show the hash string with ExecuteAction("SHOW_MILITARY_CAPTION",GetObj.Hash(self), 30) and see if it matches. If nothing works you can also try a damage nugget with 0.0000001 damage (or even 0?) and then use DamageIncoming (self, other, delay, amount) script event because it also provides the needed self and other objectsreferences. But then you need the lua filter again.
  16. Ok here is a solution I've tested for the lua part and it's working: lua code (tested and working, fine adjustment up to you) ObjectTypeHashIndexTable={["2946044786"]="AlienDevourerTank",["1097793023"]="Reaper17DevourerTank"} GetObj={} function GetObj.Hash(object) return tostring(tonumber(strsub(ObjectTemplateName(object), 6, 13), 16)) end function TestUnitControlledByAI(object) if strfind(ObjectTeamName(object), "Skirmish") ~= nil or strfind(ObjectDescription(object), " AI") ~= nil or strfind(ObjectDescription(object), " KI") ~= nil or strfind(ObjectDescription(input), "Enemy") ~= nil then return true else return false end end function IsEntryInTable(table,element) if type(table)=="string" then table=getglobal(table) end for i=1,getn(table),1 do if table[i]==element then return true end end return false end function RemoveTableElement(table,element) if type(table)=="string" then table=getglobal(table) end for i=1,getn(table),1 do if table[i]==element then tremove(table,i) return end end end OccupiedObjectsTable={} OccupiedObjectsSetFreeCountTable={} function UseTibThiefSp(self,other) if TestUnitControlledByAI(self) then --test if the unit belongs to an ai player if ObjectTypeHashIndexTable[GetObj.Hash(self)] ~= nil then --this is our self made object filter test cause the lua event nugget has no if not ObjectTestModelCondition(self,"USER_2") and not IsEntryInTable("OccupiedObjectsTable",self) then tinsert(OccupiedObjectsTable,self) --save the object reference into a table and make it "occupied" to avoid an endless special power command loop OccupiedObjectsSetFreeCountTable[self]=90 --how many times the tiberiumcrystals should attack again before this unit gets ai again and occupied status removed (test and adapt) ExecuteAction("UNIT_AI_TRANSFER",self,0) --we turn off the ai temporarily so that the unit can do its special power without interruption ExecuteAction("NAMED_FIRE_SPECIAL_POWER_AT_NAMED",self,"SpecialPower_ConversionBeam",other) elseif OccupiedObjectsSetFreeCountTable[self]<=0 then ExecuteAction("UNIT_AI_TRANSFER",self,1) --reactivate ai RemoveTableElement("OccupiedObjectsTable",self) --ExecuteAction("NAMED_HUNT",self) --optional, to beginn attack as fast as possible again else OccupiedObjectsSetFreeCountTable[self]=OccupiedObjectsSetFreeCountTable[self]-1 end end end end function RemoveFromOccupiedTable(self) if TestUnitControlledByAI(self) then RemoveTableElement("OccupiedObjectsTable",self) end end scriptevents part: <ObjectStatusEvent Name="TiberiumAmmoEmpty"> <Conditions>-HAS_TIBERIUM_AMMO</Conditions> </ObjectStatusEvent> <EventList Name="DevourerFunctions" Inherit="BaseScriptFunctions"> <EventHandler EventName="OnCreated" ScriptFunctionName="OnReaper17DevourerCreated" DebugSingleStep="false"/> <EventHandler EventName="LuaEventNuggetForDevourer" ScriptFunctionName="UseTibThiefSp" DebugSingleStep="false"/> <EventHandler EventName="TiberiumAmmoEmpty" ScriptFunctionName="RemoveFromOccupiedTable" DebugSingleStep="false"/> <EventHandler EventName="OnDestroyed" ScriptFunctionName="RemoveFromOccupiedTable" DebugSingleStep="false"/> </EventList> <EventList Name="Reaper17DevourerFunctions" Inherit="BaseScriptFunctions"> <EventHandler EventName="OnCreated" ScriptFunctionName="OnReaper17DevourerCreated" DebugSingleStep="false"/> <EventHandler EventName="LuaEventNuggetForDevourer" ScriptFunctionName="UseTibThiefSp" DebugSingleStep="false"/> <EventHandler EventName="TiberiumAmmoEmpty" ScriptFunctionName="RemoveFromOccupiedTable" DebugSingleStep="false"/> <EventHandler EventName="OnDestroyed" ScriptFunctionName="RemoveFromOccupiedTable" DebugSingleStep="false"/> </EventList> xml part (not tested, but should work): weapon fire behaviour for tiberiumcrytsal green and blue (just added one entry): <FireWeaponUpdate id="955F8DC3" ActiveWhenDisabled="" HeroModeTrigger="False" ChargingModeTrigger="False" AliveOnly="False"> <FireWeaponNugget WeaponName="MARVTiberiumFXWeapon" FireDelay="0s" FireInterval="0.4s" OneShot="False" /> <FireWeaponNugget WeaponName="TiberiumCrystalWeapon" FireDelay="3s" FireInterval="0s" OneShot="False" /> <FireWeaponNugget WeaponName="TiberiumInfestationCrystalWeapon" FireDelay="1.25s" FireInterval="0s" OneShot="False" /> <FireWeaponNugget WeaponName="TriggerDevourerConversionAbilityWeapon" FireDelay="3s" FireInterval="0s" OneShot="False" /> </FireWeaponUpdate> weapon: <WeaponTemplate id="TriggerDevourerConversionAbilityWeapon" Name="TriggerDevourerConversionAbilityWeapon" RadiusDamageAffects="ALLIES ENEMIES NEUTRALS NOT_SIMILAR" > <PreAttackDelay MinSeconds="1.0s" MaxSeconds="2.5s" /> <FiringDuration MinSeconds="0s" MaxSeconds="0s" /> <Nuggets> <LuaEventNugget EventName="LuaEventNuggetForDevourer" Radius="20.0" SendToEnemies="true" SendToAllies="true" SendToNeutral="true"> </LuaEventNugget> </Nuggets> </WeaponTemplate> I don't know if this is for KW or TW. In any case prove the AILuaEventsList in th AIUpdate entry for both units. In KW both devourers have the same entry: <AI> <AIUpdate id="ModuleTag_AI" AutoAcquireEnemiesWhenIdle="YES" AILuaEventsList="Reaper17DevourerFunctions"> <UnitAITargetChooserData CanPickDynamicTargets="false" SympathyRange="25.0" /> </AIUpdate> </AI>
  17. Try to remove the kind of "IMMOBILE" and test if that works. I've had same problems with my lua object position spawner initially.
  18. Sorry I'm not familiar with the conversion reserve power? How does it work exactly? Then i can give you a proper solution maybe. If it is something weapon related then you could use the SpawnBehaviorModule which will be triggered by an upgrade. The Upgrade can be triggered via lua, equally as above but with ObjectGrantUpgrade(self,"upgradename"). The spawned attacker can have a lifetime for 1s and then replace itself via death ocl with a new object that tests the model condition for it's parent and deletes itself if false.
  19. Did you use correct syntax? function UseTibThiefSp(self,other) if ObjectTestModelCondition(self,"USER_2") then ObjectDoSpecialPower(self,"ConversionbeamSP") end end Look if "ConversionbeamSP" is the correct name according to your sp xml definition. If you use a lua event nugget somehow then self is the victim and other the attacker if i remember correct.
  20. Wow finally. Thanks a lot. Next we need to get the sage engine C++ source code.
  21. Yes that was my idea. I replaced most of my special powers with "structure build" buttons. The special powers then have a seperate menu as an aircraft tab menu. That also solves the bugs/problems that appear if you have too many specialpower buttons at once. The solution I meant is not practicable right now, as it involves some hundred lines of lua code of a positional tracking system and other stuff I made. My idea is to choose an initial spawn position and with a second position selection you choose the direction. Then you calculate the angle and based on that spawn an ocl extender whch provides the desired object with angle. I will release the mod behind and full source code maybe this year, so stay tuned. Whatever you do, a workaround wil require some form of a reference point, as I cannot think of any native way manipulating the special powers activation behaviour.
  22. What about the other way around, creating a special power via building an ocl extender dummy which inherits the angle from the preplacement? Else I can only think of a solution which involves two button actions.
  23. Mjjstral

    Units voice

    Replace the audio file in the AudioZH.big if you don't want to mess with .ini coding. Use FinalBig or something else.
  24. Hope this reply isn't to late. The method you describe involves using the world builder tool. There you have to use the script editor where you can make scripts for your map or edit external scripts which have .scb format. In generals there is the SkirmishScripts.scb and MultiplayerScripts.scb you can find in the data/Scripts folder of the game path. You can import them, then edit and then export again. The second method is to extract and edit the CommandSet.ini from one of the contra .big files. Just delete the entry from the respective warfactory commandset and put the file back to the .big file or put it to data/ini folder (create the folder if not available). BTW welcome to the forums
  25. Try to compare the .map files before and after a map resize (winmerge) and conclude from the changes how to set the size manually. Or try to manipulate the memory of world builder with CheatEngine. Use increased, decreased and unchanged value options to filter the memory adresses. From my experiments I know that even objects far beyond the final map border can exist and behave properly. So I suppose sage engine has another internal 'virtual' map limit we do not know of... Please report the results of your investigation.
×