-
Content count
110 -
Joined
-
Last visited
Everything posted by Mjjstral
-
Disable official skirmish map
Mjjstral replied to someguy11's topic in Tiberium Wars / Kane's Wrath Maps & Modding
Hm at least for kw this method doesn't seem work. I don't know if wrathed is including the file properly... You can test it for TibWars. Take the MapMetaData.xml from the public source code and set every "IsMultiplayer" and "IsOfficial" to false and look if the maps diappear ingame. -
Disable official skirmish map
Mjjstral replied to someguy11's topic in Tiberium Wars / Kane's Wrath Maps & Modding
Maybe have a look at MapMetaData.xml and make an entry if not available. Try to use the options IsMultiplayer="false" and IsOfficial="false". Haven't tested it yet so tell me if you find a way. -
Objectfilter on FireOnObjectsNugget?
Mjjstral replied to Stygs's topic in Tiberium Wars / Kane's Wrath Maps & Modding
Hm maybe it really has something to do with the type of nugget and its respective exotic behaviour. Try to duplicate it one by one from my source code. I can assure you it definitely works with at least some nuggets in KW 1.2. Also I remember there was a reason I have used "CAN_ATTACK" instead of in such cases commonly used statuses like "RIDER1". But also keep in mind that the protective status must be active as long as needed. Good Luck -
Objectfilter on FireOnObjectsNugget?
Mjjstral replied to Stygs's topic in Tiberium Wars / Kane's Wrath Maps & Modding
Fire an AttributeModifierNugget on allied which gives a status to them. Then exclude this status from being attacked. I've done something equal once to disable the enemy ai without affecting allied ai (see my source code). As status you can use "CAN_ATTACK". I know most units should actually have that status already but somehow it works nevertheless. Example: <WeaponTemplate id="ProtectorWeapon" Name="ProtectorWeapon" RadiusDamageAffects="ALLIES" AttackRange="500000.0" > <Nuggets> <AttributeModifierNugget Radius="500000" PartitionFilterTestType="SPHERE" AttributeModifierName="AttributeModifier_Protector"> <SpecialObjectFilter Rule="ANY" Relationship="SAME_PLAYER" Include="VEHICLE HUGE_VEHICLE INFANTRY STRUCTURE AIRCRAFT"> </SpecialObjectFilter> </AttributeModifierNugget> </Nuggets> </WeaponTemplate> <AttributeModifier id="AttributeModifier_Protector" Category="NONE" ObjectStatusToSet="CAN_ATTACK" Duration="1.21s"> </AttributeModifier> And for your actual weapon use this entry: ForbiddenTargetObjectStatus="CAN_ATTACK" -
Infantry Stealth Upgrade
Mjjstral replied to Stygs's topic in Tiberium Wars / Kane's Wrath Maps & Modding
I think this is a bug of the internal upgrade stack refreshing process. You can try to grant the upgrade remove it again and grant again two times and see if it works then (if you purely work with beaviour modules). If your motivation is high you can do the lua way of solving this. Upgrade triggers status -> status triggers lua script event -> lua function triggers your stealth upgrade but in a certain way overcoming the upgrade stack bug: <StatusBitsUpgrade id="ModuleTag_StatusBitUpgrade01" StatusToSet="RIDER1"> <TriggeredBy>Upgrade_PreStealthTrigger</TriggeredBy> </StatusBitsUpgrade> scriptevents.xml <ObjectStatusEvent Name="StealthTrigger"> <Conditions>+RIDER1</Conditions> </ObjectStatusEvent> <EventList Name="StealthTriggerEvent" Inherit="BaseScriptFunctions"> <EventHandler EventName="StealthTrigger" ScriptFunctionName="GiveStealthUpgrade" DebugSingleStep="false"/> </EventList> scripts.lua function GiveStealthUpgrade(self) ObjectGrantUpgrade(self, "Upgrade_RefreshDummy") --refresh upgrade stack ObjectRemoveUpgrade(self, "Upgrade_RefreshDummy") ObjectGrantUpgrade(self, "Upgrade_Stealth") --your actual upgrade, finally end If you want another example see my source code for the toggleable autoshield ai mode here. Hope that helps. -
How to combine gamedata.ini in Wrathed?
Mjjstral replied to ztz2019's topic in Tiberium Wars / Kane's Wrath Maps & Modding
Oh i forgot the most important part of the code...To get rid of the black borders that appear if you zoom out excessivlely: ExecuteAction("SET_CAMERA_CLIP_DEPTH_MULTIPLIER", Camera_Clip_Depth) A Camera_Clip_Depth Factor of 3.0 is sufficient. The result is great if you don't use my second method. Here is an example where you can see the entire map barstow badlands without black borders or distorted health bars. -
How to combine gamedata.ini in Wrathed?
Mjjstral replied to ztz2019's topic in Tiberium Wars / Kane's Wrath Maps & Modding
You can totally change the camera in every way you could ever imagine via lua scripts. You just need an initial trigger dummy via the playerspellbook (remove inert kindoff) or via starting unit entry in playertemplate.ini (StartingUnit1 = yourunit) You have multiple ways: 1. set the zoom manually within a timeframe then lock: (cause it jumps back after changing again) ExecuteAction("LOCK_CAMERA_ZOOM", 0) ExecuteAction("CAMERA_LETTERBOX_BEGIN") --this removes zoom limitation completely but you have a block border so you need to disable it delayed ExecuteAction("SHOW_UI") --delayer starts here ExecuteAction("CAMERA_LETTERBOX_END") ExecuteAction("LOCK_CAMERA_ZOOM", 1) I have coded a lua scripttimer to use as a delayer but its to complicated to post it here (wait for my "meta mods" next source code release) But you can use a dummy with lifetime that creates another dummy that runs your lua code. 2. ExecuteAction("CAMERA_SET_DEFAULT", 0.00, 0.00 , Camera_Max_Zoomable_Height) --donwside: lifebars grow and shrink with it workaround: just make a subtle change or use ExecuteAction("OPTIONS_SET_DRAWICON_UI_MODE", 0) to hide health bars 3. ExecuteAction("ZOOM_CAMERA", Cam_Height , 1, 1, 1) ExecuteAction("LOCK_CAMERA_ZOOM", 1) This needs a lock cause it also jumps back if you use zoom afterwards. 4. best way 1: use method 1 with an autoconfig file or ingame setup menu 5. best way 2: Use this custom map that exploits a bug of the sage engine i found: load it once, and it automatically exits back to the menu. Now you have free unlimited cam zoom for every map you load after (strange i know, but it works) You will see great camera manipulation examples in my next release of "meta mod". There you will even have an ingame command console that accepts many predefined commands and any lua code. Besides that there will be a control menu that gives you crazy possibilites also manipulating camera and performance. -
hi, I did some research on Lua and also found some nice possibilities. See the Source Code of my mod for more examples: http://www.moddb.com/mods/mjjstral/downloads/meta-mod-101-source-code I add a list at the end of this post. But first I want to give some inspirational ideas where I will need the help of you Experts e.g. Lauren, Ravendark, Megumi and all the other good people. I figured out that we can use all ExecuteActions where we pass a unit (self) to the function. These mostly beginn with NAMED_ (NAMED_DAMAGE, NAMED_USE_COMMANDBUTTON_ABILITY....). On the other side there is many actions where you need to use Player or Team, for example: ExecuteAction("PLAYER_SET_MONEY", Player_1?, 77777); ExecuteAction("NAMED_TRANSFER_OWNERSHIP_PLAYER", self, PLAYER_1?); ExecuteAction("UNIT_SET_TEAM", self, TEAM_1?); I don't know if we can make these to work if we find a way to adress the attribute PLAYER or TEAM properly: Think about creating a diplomacy System and many other nice possibilities... Another way which can turn out to be the holy grail of C&C Modding is to use scripts with one of these Actions: ExecuteAction("UNIT_EXECUTE_SEQUENTIAL_SCRIPT".... ExecuteAction("ENABLE_SCRIPT"... ExecuteAction("UNIT_EXECUTE_SEQUENTIAL_SCRIPT_LOOPING"... ExecuteAction("CALL_SUBROUTINE"... At least you can activate and run the scripts which were already added to the map with these commands. But the point is to run external scripts added to the mod package not the map. Maybe export a World Builder script then load it as an external file in scripts.lua and run it with the above... Now here is the List of mostly testet and working Actions: CAMERA ExecuteAction("CAMERA_SET_DEFAULT", 0.00, 0.00 , 1.0); (only last parameter works) ExecuteAction("SET_CAMERA_CLIP_DEPTH_MULTIPLIER", 1.0); --1.0=default, smaller 1 shortens, bigger 1 lengthens ExecuteAction("CAMERA_MOD_SET_FINAL_SPEED_MULTIPLIER", 1) ExecuteAction("CAMERA_MOD_SET_ROLLING_AVERAGE", 5); -- 1=smooth, 5=very smooth ExecuteAction("LOCK_CAMERA", 1); ExecuteAction("HIDE_UI"); ExecuteAction("SHOW_UI"); GRAPHICS/GAMESPEED ExecuteAction("OPTIONS_SET_PARTICLE_CAP_MODE", 0); ExecuteAction("OPTIONS_SET_DRAWICON_UI_MODE", 0); ExecuteAction("TERRAIN_RENDER_DISABLE", 1); -- ground gets black ExecuteAction("SET_VISUAL_SPEED_MULTIPLIER", speed) ExecuteAction("SET_FPS_LIMIT", fps_speed) OTHER ExecuteAction("NAMED_KILL", self); ExecuteAction("NAMED_USE_COMMANDBUTTON_ABILITY", self, "Command_Name") ExecuteAction("NAMED_DAMAGE", self, 9999999); ExecuteAction("RESUME_SUPPLY_TRUCKING"); ExecuteAction("SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS", 1); ExecuteAction("OPTIONAL_VICTORY") ExecuteAction("SHOW_MILITARY_CAPTION", "MESSAGE:Name", 8); ExecuteAction("VICTORY"); ExecuteAction("SCREEN_SHAKE", "Cine_Insane") Maybe work maybe not ExecuteAction("WAREHOUSE_SET_VALUE", self, 55555); ExecuteAction("TECHTREE_MODIFY_BUILDABILITY_OBJECT", self); ExecuteAction("MAP_SHROUD_SET_RESHROUD_TIME", 5); ExecuteAction("PLAY_SOUND_EFFECT", SoundName); ExecuteAction("NAMED_RECEIVE_UPGRADE", self, Upgrade); ExecuteAction("NAMED_USE_COMMANDBUTTON_ON_NEAREST_ENEMY_BUILDING", "Command_Name"); Another possibly nice command besides ExecuteAction: EVALUATECONDITION (Use the Conditions from World Builder) EvaluateCondition("MULTIPLAYER_ALLIED_VICTORY") EvaluateCondition("MULTIPLAYER_ALLIED_DEFEAT") EvaluateCondition("IS_GAME_IN_SKIRMISH_OR_MULTIPLAYER")
