Jump to content

Derdan

Diplomunion Member
  • Content Count

    18
  • Joined

  • Last visited

Community Reputation

6 Neutral

About Derdan

  • Birthday 06/01/1995

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Derdan

    Derdan

  2. I feel like Trump is actually the reason we haven't gone to war yet.
  3. Derdan

    Ask Diplo

    If someone told me they beat off to me, it would be the nicest thing ever said about me.
  4. Derdan

    Ask Diplo

    OH MY GOD ^^^^ THIS ^^^^ x1000
  5. 45 percent of registered voters approve of pineapple as a pizza topping, according to a poll by Public Policy Polling. Thirty-five percent disapproved, and 20 percent were not sure. Younger people were more into pineapple than older people. Source: https://fivethirtyeight.com/features/what-do-americans-think-about-the-mueller-investigation-now-that-its-over/
  6. The game already does start delayed... it could also be done so, for example, Russia's trenches are loaded instantly at game start, France's a second later, Britain's a second after that, etc. Of course we won't know if it lags until he tries it. I'd say it's unlikely to cause problems.
  7. Instead of adding players willy-nilly, why not start small by splitting Russia (controlling by far the largest amount of land of any player) to give the opportunity of the historical but often absent Caucasus and Carpathian fronts. I propose Russia be split north-south: northern Russia gets Petrograd, Moscow, Riga, and Warsaw(?) and fights Germany and Austria near the Czech border. Southern Russia gets Kiev, Sevastopol, and a new city (Rostov would probably be a good fit) and fights Hungary and Turkey. West Germany would also be split (so now it's 7v7) into Southern and Northern Germany. Northern Germany gets Hamburg (add Cologne?), controls the navy, and fights the British in Belgium. Southern Germany gets Munich and Strassburg and fights the French. This way it's no longer a West Germany desperately clinging on to life the entire game facing a 2v1 until their allies win/neutralize their fronts and come help. As it stands now, Germany can't even take Belgium. Splitting the Ottomans up into Turkey proper and their Levant holdings would be an option too, but would be much better implemented if the map is expanded eastward, allowing a Mesopotamian front.
  8. Ah it's because the text here thinks it's markup or something within the brackets. In the RegisterPlayerUnitEvent function all references to t should be t[i‌] Don't copy the t[i‌] from here to the WE. I put a zero-width space so the brackets show. You can delete the RegisterPlayerUnitEventForPlayer function. Also I take it you are using a unit indexer? That's needed for this to work. I don't know if this will cause lag whenever trenches spawn with units automatically loaded inside (e.g. starting trenches on borders). In the object editor, trenches should have default coloring RGB(75,75,75) -- or whatever dark grayish color you like. Also you'll need this trigger so your enemies always perceive your trenches as being filled: [spoiler=Code] function OnTrenchBuild takes nothing returns nothing if IsUnitTrench(GetTriggerUnit()) and IsPlayerEnemy(GetLocalPlayer(), GetOwningPlayer(GetTriggerUnit())) then call SetUnitVertexColor(GetConstructingStructure(), 255, 255, 255, 255) endif endfunction Add this to the Init function: [spoiler=Code] call RegisterPlayerUnitEvent(EVENT_PLAYER_UNIT_CONSTRUCT_START, function OnTrenchBuild) I don't know if this system will cause lag when at game start or when countries enter the war. If it does, you could probably circumvent it by manually changing their color in the trigger editor at game initialization so that the trigger isn't firing 1,000 times at the start of the game.
  9. Eagle add this so I can be in the credits. Just makes your allies' trenches normal color when they have at least one guy in them, and dark if they're empty. Your enemies can't see this effect (they're always regular color to them). [spoiler=Code] scope AlliedTrenchVisibility initializer Init globals private integer array TrenchCargo endglobals function IsUnitTrench takes unit u returns boolean local integer id = GetUnitTypeId(u) return id == 'otrb' /* German Trench Id */ or id == 'ussr' /* Russian Trench Id */ // etc.. endfunction function OnUnitLoaded takes nothing returns nothing local unit u = GetTriggerUnit() local integer id = GetUnitUserData(u) set TrenchCargo[id] = TrenchCargo[id] + 1 if IsPlayerAlly(GetLocalPlayer(), GetOwningPlayer(GetTriggerUnit())) then call SetUnitVertexColor(GetTransportUnit(), 255, 255, 255, 255) endif set u = null endfunction function OnUnitUnloaded takes nothing returns nothing local integer id local integer t local unit u = GetTriggerUnit() if IsUnitTrench(u) then set id = GetIssuedOrderId() if id == 852113 then // Stand Down set t = GetUnitUserData(u) set TrenchCargo[t] = 0 if IsPlayerAlly(GetLocalPlayer(), GetOwningPlayer(u)) then call SetUnitVertexColor(u, 75, 75, 75, 255) endif elseif id == 852047 then // Unload set t = GetUnitUserData(u) set TrenchCargo[t] = TrenchCargo[t] - 1 if TrenchCargo[t] <= 0 and IsPlayerAlly(GetLocalPlayer(), GetOwningPlayer(u)) then call SetUnitVertexColor(u, 75, 75, 75, 255) endif endif endif set u = null endfunction function Init takes nothing returns nothing call RegisterPlayerUnitEvent(EVENT_PLAYER_UNIT_LOADED, function OnUnitLoaded) call RegisterPlayerUnitEvent(EVENT_PLAYER_UNIT_ISSUED_ORDER, function OnUnitUnloaded) // All Units Unloaded (Stand Down) call RegisterPlayerUnitEvent(EVENT_PLAYER_UNIT_ISSUED_UNIT_ORDER, function OnUnitUnloaded) // Specific Unit Unloaded (Icon Clicked) endfunction endscope [spoiler=RegisterPlayerUnitEvent lib] /************************************************************** * * RegisterPlayerUnitEvent * v5.1.0.1 * By Magtheridon96 * * I would like to give a special thanks to Bribe, azlier * and BBQ for improving this library. For modularity, it only * supports player unit events. * * Functions passed to RegisterPlayerUnitEvent must either * return a boolean (false) or nothing. (Which is a Pro) * * Warning: * -------- * * - Don't use TriggerSleepAction inside registered code. * - Don't destroy a trigger unless you really know what you're doing. * * API: * ---- * * - function RegisterPlayerUnitEvent takes playerunitevent whichEvent, code whichFunction returns nothing * - Registers code that will execute when an event fires. * - function RegisterPlayerUnitEventForPlayer takes playerunitevent whichEvent, code whichFunction, player whichPlayer returns nothing * - Registers code that will execute when an event fires for a certain player. * - function GetPlayerUnitEventTrigger takes playerunitevent whichEvent returns trigger * - Returns the trigger corresponding to ALL functions of a playerunitevent. * **************************************************************/ library RegisterPlayerUnitEvent // Special Thanks to Bribe and azlier globals private trigger array t endglobals function RegisterPlayerUnitEvent takes playerunitevent p, code c returns nothing local integer i = GetHandleId(p) local integer k = 15 if t == null then set t = CreateTrigger() loop call TriggerRegisterPlayerUnitEvent(t, Player(k), p, null) exitwhen k == 0 set k = k - 1 endloop endif call TriggerAddCondition(t, Filter(c)) endfunction function RegisterPlayerUnitEventForPlayer takes playerunitevent p, code c, player pl returns nothing local integer i = 16 * GetHandleId(p) + GetPlayerId(pl) if t == null then set t = CreateTrigger() call TriggerRegisterPlayerUnitEvent(t, pl, p, null) endif call TriggerAddCondition(t, Filter(c)) endfunction function GetPlayerUnitEventTrigger takes playerunitevent p returns trigger return t[GetHandleId(p)] endfunction endlibrary
  10. If I were to write my autobiography, I may as well start here. What happens here will comprise the foundation of the rest of my life. I could start with my being born in Albany, NY or my subsequent upbringing by wolves, but you don't want to hear about that. What matters now is I am part of the most fabulous forum on the inter-web: Diplomunion.
×
×
  • Create New...