View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0003702 | Spring engine | General | public | 2013-04-14 20:58 | 2013-04-27 23:03 | ||||
Reporter | abma | ||||||||
Assigned To | Kloot | ||||||||
Priority | normal | Severity | major | Reproducibility | have not tried | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 94.1.1+git | ||||||||
Target Version | 95.0 | Fixed in Version | |||||||
Summary | 0003702: most weapons can't / don't shoot | ||||||||
Description | for example the strike commander of zero-k doesn't shoot. | ||||||||
Additional Information | 94.1.1-169-g8402b8b develop | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
abma (administrator) 2013-04-14 21:47 |
weird, can't reproduce in BA |
Kloot (developer) 2013-04-15 01:30 Last edited: 2013-04-27 23:03 |
BrainDamage broke LuaUnitScript'ed units (which BA doesn't have) with https://github.com/spring/spring/commit/ba9721b4e4a296f35efd9838a36c94ab7a9f476e (contrary to FLOZi's claim in http://springrts.com/phpbb/viewtopic.php?f=12&t=30153 this change *is* in fact responsible because it did *not* just affect the new callins). Although that commit makes the Lua interface more consistent, using 1-based weapon indices is still fucking retarded (not to mention extremely error-prone) and I doubt the entire API is now converted so it will need revision anyway. |
Google_Frog (reporter) 2013-04-20 09:14 |
As far as I know this is the only thing blocking ZK. I'd have games testing engines if this were fixed because 94.1 doesn't work all that well and with static builds the Linux people won't be left out. |
cleanrock (reporter) 2013-04-25 19:11 |
Shouldn't this be on 95 Roadmap ? Do we want to revert this change or force all games to use 1 based indices ? |
abma (administrator) 2013-04-25 23:52 |
yep. at least we should know if we keep or if we revert this commit. currently it seems we'll keep it?! |
Kloot (developer) 2013-04-26 02:39 Last edited: 2013-04-26 02:41 |
If the commit is kept I would prefer to force use of 0-based indices in one fell swoop, the amount of work for game-devs would be roughly the same (and clearly many scripts in ZK already assume weapon indices start at 0 or they would not have been broken). If it is not kept we are left with a more messy API that has to be sanitized at some point anyway but gives game-devs more time to prepare, although they won't be able to use the new functions without creating extra work for themselves when that happens. |
cleanrock (reporter) 2013-04-26 07:06 |
I prefer 0-based too but i guess this 1-based change was because of Luas odd "Counting From One". |
Google_Frog (reporter) 2013-04-26 17:21 |
What do you mean "assume weapon indices start at 0"? Most of the time we don't delve that deep into the system. Most of the scripts use AimWeapon1, AimWeapon 2 etc... I think unit_script.lua needs to be updated to reflect this change, that is where the problem lies. |
FLOZi (reporter) 2013-04-26 22:42 |
lua assumes tables start at 1, and unitdefs start at 1... It's hugely more consistent from a gamedev PoV to have 1-based indices. I also don't quite grasp what you mean with "clearly many scripts in ZK already assume weapon indices start at 0 or they would not have been broken" |
KingRaptor (reporter) 2013-04-27 04:39 |
Should just need updating of basecontent gadget with https://code.google.com/p/zero-k/source/detail?r=10015 |
emmanuel (reporter) 2013-04-27 06:31 |
maybe changing the engine in worst manner will avoid ZK gamedev to fix a gadget bug of them ? |
Kloot (developer) 2013-04-27 12:27 Last edited: 2013-04-27 12:28 |
"What do you mean "assume weapon indices start at 0"" What could I possibly mean... https://code.google.com/p/zero-k/source/diff?spec=svn10017&r=10017&format=side&path=/trunk/mods/zk/LuaRules/Gadgets/unit_water_effects.lua https://code.google.com/p/zero-k/source/diff?spec=svn10017&r=10017&format=side&path=/trunk/mods/zk/LuaRules/Gadgets/unit_control_gunship_stafe_range.lua https://code.google.com/p/zero-k/source/diff?spec=svn10017&r=10017&format=side&path=/trunk/mods/zk/LuaRules/Gadgets/unit_attributes.lua https://code.google.com/p/zero-k/source/diff?spec=svn10017&r=10017&format=side&path=/trunk/mods/zk/LuaRules/Gadgets/unit_AA_micro_gadget.lua So no, "just updating basecontent" would not have been enough for ZK. |
Google_Frog (reporter) 2013-04-27 13:07 |
"clearly many scripts in ZK already assume weapon indices start at 0 or they would not have been broken" Scripts. Not gadgets. Of course the gadgets were broken by this as well. 'scripts' has specific meaning in this area. I know the gadgets were broken as well but there are so few of them that use weapon functions that I don't care. They are easy to fix. The important thing for me was possibly needing to find someone with the time to rewrite a lot of scripts. Anyway, the scripts did not need to be rewritten and ZK now has the updates to unit_script.lua. |
Kloot (developer) 2013-04-27 23:03 |
Then I assume this is no longer an issue; others can follow ZK's example. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2013-04-14 20:58 | abma | New Issue | |
2013-04-14 21:47 | abma | Note Added: 0010452 | |
2013-04-15 01:30 | Kloot | Note Added: 0010456 | |
2013-04-15 01:36 | Kloot | Note Edited: 0010456 | View Revisions |
2013-04-15 01:42 | Kloot | Note Edited: 0010456 | View Revisions |
2013-04-15 01:44 | Kloot | Relationship added | duplicate of 0003695 |
2013-04-20 09:14 | Google_Frog | Note Added: 0010510 | |
2013-04-25 19:11 | cleanrock | Note Added: 0010556 | |
2013-04-25 23:51 | abma | Target Version | => 95.0 |
2013-04-25 23:52 | abma | Note Added: 0010557 | |
2013-04-26 02:39 | Kloot | Note Added: 0010558 | |
2013-04-26 02:41 | Kloot | Note Edited: 0010558 | View Revisions |
2013-04-26 02:42 | Kloot | Note Edited: 0010456 | View Revisions |
2013-04-26 07:06 | cleanrock | Note Added: 0010559 | |
2013-04-26 17:21 | Google_Frog | Note Added: 0010563 | |
2013-04-26 22:42 | FLOZi | Note Added: 0010565 | |
2013-04-27 04:39 | KingRaptor | Note Added: 0010566 | |
2013-04-27 06:31 | emmanuel | Note Added: 0010567 | |
2013-04-27 12:27 | Kloot | Note Added: 0010571 | |
2013-04-27 12:28 | Kloot | Note Edited: 0010571 | View Revisions |
2013-04-27 13:07 | Google_Frog | Note Added: 0010572 | |
2013-04-27 23:03 | Kloot | Note Edited: 0010456 | View Revisions |
2013-04-27 23:03 | Kloot | Note Added: 0010576 | |
2013-04-27 23:03 | Kloot | Status | new => resolved |
2013-04-27 23:03 | Kloot | Resolution | open => fixed |
2013-04-27 23:03 | Kloot | Assigned To | => Kloot |