User:Zeldrake

From Total War Modding
Revision as of 22:51, 16 August 2026 by Zeldrake (talk | contribs)

this is a sandbox for Zel to debug whatever is going on with the underscores

Some code goes here, right? no that's not it

bachsadhjsajkd

YES WE FOUND A CODE BLOCK BUTTON
NOW_DO_THESE_UNDERSCORES_ACTUALLY_WORK
AND_IF_NOT_WHY
TELL_ME

In this document, let’s take a look at two example commands to breakdown.

    <Command: 	transfer_region_to_faction	
    Description: 	Transfer a region ownership to a faction.	
    Usage: 		transfer_region_to_faction("region", "faction")

NOW WHY DOESN'T THAT WORK

Command: 	transfer_region_to_faction	
     Description: 	Transfer a region ownership to a faction.	
     Usage: 		transfer_region_to_faction("region", "faction")

you can see the above works because it's done with not SYNTAXHIGHLIGHT not CODE

Do not tell me about whatever language AND 
syntax highlighting this SUM
 may have going on in it because I really don't care

ahsadsad

It doesn't let me click None in the box :( 

I mean

Why does it need to click None?

Surely we can just click Lua instead, right?

sjhsajkhdsad

Command: 	transfer_region_to_faction	
     Description: 	Transfer a region ownership to a faction.	
     Usage: 		transfer_region_to_faction("region", "faction")

Well, that complains about lua errors because it's the documentation for something as opposed to the actual function itself, so why don't we actually try it on some actual lua code that actually exists

function(context)

   local char_cqi = context:character():command_queue_index()
   local char_lookup_str = cm:char_lookup_str(char_cqi)
   local mf_cqi = context:character():military_force():command_queue_index()
   
   cm:grant_unit_to_character(char_lookup_str, "tutorial_big_bat")
   cm:apply_effect_bundle_to_force("tutorial_free_hair", mf_cqi, 5)

end,


function(context)

    local char_cqi = context:character():command_queue_index()
    local char_lookup_str = cm:char_lookup_str(char_cqi)
    local mf_cqi = context:character():military_force():command_queue_index()
    
    cm:grant_unit_to_character(char_lookup_str, "tutorial_big_bat")
    cm:apply_effect_bundle_to_force("tutorial_free_hair", mf_cqi, 5)

end,

Still complains about error messages but you can see how nice and organized it looks AND MORE IMPORTANTLY THE UNDERSCORES AREN'T BROKEN BECAUSE THERE AREN'T ANY NASTY-LOOKING BOXES AROUND THE TEXT