Loading...
  OR  Zero-K Name:    Password:   

Post edit history

learning to code

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
2/22/2024 7:21:11 AMAUrankSmokeDragon before revert after revert
2/22/2024 5:24:47 AMAUrankSmokeDragon before revert after revert
2/22/2024 5:20:27 AMAUrankSmokeDragon before revert after revert
2/22/2024 5:16:02 AMAUrankSmokeDragon before revert after revert
Before After
1 my current this doesnt work list: 1 my current this doesnt work list:
2 \n 2 \n
3 [q]{{{ 3 [q]{{{
4 \n 4 \n
5 for i = 1, #UnitDefs do 5 for i = 1, #UnitDefs do
6 local customParams = UnitDefs[i].customParams 6 local customParams = UnitDefs[i].customParams
7 if customParams and customParams.pylonrange then 7 if customParams and customParams.pylonrange then
8 customParams.pylonrange = customParams.pylonrange * 4 8 customParams.pylonrange = customParams.pylonrange * 4
9 end 9 end
10 end 10 end
11 \n 11 \n
12 }}}[/q] 12 }}}[/q]
13 [q]{{{ 13 [q]{{{
14 \n 14 \n
15 for name, ud in pairs(UnitDefs) do 15 for name, ud in pairs(UnitDefs) do
16 if ud.customParams then 16 if ud.customParams then
17 for key, value in pairs(ud.customParams) do 17 for key, value in pairs(ud.customParams) do
18 if key == "pylonrange" then 18 if key == "pylonrange" then
19 ud.customParams[key] = value * 4 19 ud.customParams[key] = value * 4
20 end 20 end
21 end 21 end
22 end 22 end
23 end 23 end
24 \n 24 \n
25 }}}[/q] 25 }}}[/q]
26 [q]{{{ 26 [q]{{{
27 \n 27 \n
28 for name, ud in pairs(UnitDefs) do 28 for name, ud in pairs(UnitDefs) do
29 if ud.customParams and ud.customParams.pylonrange then 29 if ud.customParams and ud.customParams.pylonrange then
30 ud.customParams.pylonrange = ud.customParams.pylonrange * 4 30 ud.customParams.pylonrange = ud.customParams.pylonrange * 4
31 end 31 end
32 end 32 end
33 \n 33 \n
34 }}}[/q] 34 }}}[/q]
35 [q]{{{ 35 [q]{{{
36 \n 36 \n
37 thats enough for today.. 3 weeks and hundreds of attempts.. is enough 37 thats enough for today.. 3 weeks and hundreds of attempts.. is enough
38 \n 38 \n
39 im thinking maybe i should just give up altogether 39 im thinking maybe i should just give up altogether
40 the code from others mods did not work and even ai seems to think the code is valid
40 \n 41 \n
41 these mods will never be made by me.. 42 these mods will never be made by me..
42 \n 43 \n
43 everything can everything 44 everything can everything
44 everything is 10x smaller 45 everything is 10x smaller
45 everything explodes based on costs 46 everything explodes based on costs
46 \n 47 \n
47 \n 48 \n
48 }}}[/q] 49 }}}[/q]
49 \n 50 \n