3UC/4UC for VP: Project Coordination Thread

Status
Not open for further replies.
@Infixo You were right about Unittrained. It triggers both events. I will think of simplifying it to maximum. I will update my VP tomorrow and hunt for CTD.

@pineappledan Germany ready. You can check by yourself Moral and Chapter promotion and tweak them as needed.
 
Last edited:
So the tambo text was causing a freeze because of the Coca in-text icon. Something is going wrong with that art asset I think. I have removed it from the text for now.

I'm not sure what is going wrong with the Chasqui, that it won't appear in the game. I tried removing the lua, and that did nothing, and I have gone line-by-line through the SQL. not sure what the problem is.

Funny that the only UCs which are having obvious problems presenting in-game are both from the same civ

Multiple fixes for text. mostly fixed tabs, icons and spacing
 
Last edited:
@Infixo how to find max religiontypes? I mean something like this: DirectionTypes.NUM_DIRECTION_TYPE bu for religion types? I need it to put into "for" loop instead of flat integer which can be changed.
 
Are you serious?
Spoiler Bugs, bugs, bugs, bugs again! :

[2997.091] no such column: false
[2997.106] no such column: Type
[2997.106] Database::XMLSerializer (Japan/Yamato/AnimationsAndEffects/civ5artdefines_viseffects.xml): 'Row' or 'Delete' expected, got 'Name'.
[2997.122] no such column: YieldType
[2997.122] near "(": syntax error
[3002.317] Validating Foreign Key Constraints...
[3002.847] Invalid Reference on Buildings.Civilopedia - "TXT_KEY_BUILDING_IZIKO_TEXT" does not exist in Language_en_US
How can I add new stuff or test current changes if game throws such amount of sql bugs on me?

Master branch is broken for now. It's really frustrating. Now I need to start bugfixing to make it playable. Aaaaaaaaaaaaaaaaaaaaargh!

Fixed few crucial bugs:
  • Chasqui appeared.
  • Missing comma in Chaebol (argh!)
  • Thrown away unnecessary visal animation folder from Yamato
  • Missing help text for chasqui
  • Missing help text for izinduna
  • Tambo font fixed
  • Chaebol sql fixed (another issue)
    • and another comma...
  • and whole bunch of bugs in Iziko
Why did you create such a mess in code and file structure? It should be easy to read for everyone, not only person who created it. Now first thing I need to do is clean whole mod. It's better to do one thing but of good quality instead of whole bunch of messy crap. Seriously. And you even didn't check if it works and put it into master.

Fixed almost all crashing stuff.
2 "Type column" bugs are left. Good luck.
 
Last edited:
@Infixo I got massive error list in lua:
Code:
[12514.306] Runtime Error: [string "C:\Users\Adam\Documents\My Games\Sid Meier's ..."]:578: bad argument #1 to 'ConvertTextKey' (string expected, got nil)
stack traceback:
    [C]: in function 'ConvertTextKey'
    [string "C:\Users\Adam\Documents\My Games\Sid Meier's ..."]:578: in function 'PopulateList'
    [string "C:\Users\Adam\Documents\My Games\Sid Meier's ..."]:9073: in main chunk
    [C]: at 0x01278270
[12514.306] Runtime Error: Error loading C:\Users\Adam\Documents\My Games\Sid Meier's Civilization 5\MODS\(6c) 43 Civs CP\EUI\CivilopediaScreen.lua.
[12528.970] Runtime Error: [string "Assets\DLC\Expansion2\UI\InGame\InGame.lua"]:1262: attempt to index local 'addinFile' (a nil value)
stack traceback:
    [string "Assets\DLC\Expansion2\UI\InGame\InGame.lua"]:1262: in main chunk
    [C]: at 0x01278270
[12528.970] Runtime Error: Error loading Assets\DLC\Expansion2\UI\InGame\InGame.lua.
Base VP has no such errors. Our mod cause it.

I made modifications for Goedendag and Ballista and they work. Then I started to modify Seir Morb, Iron Chariot and Landwehr and their luas don't work at all. Even old code which was fine (from master branch).

I'm using now 2-1 VP.

My changes are loaded into Beta branch, but I tested master and has the same issues. I commented all new luas to prevent chasqui lua bug and maybe some other but it didn't help. Then I commented Ballista, Goedendag, Landwehr, Iron Chariot, Seir Morb, Slaganz and Shophet luas with the same result. No cure. I have no idea what can cause it and when it showed up.

I need your help here. I think my changes to mentioned files are good. Reason is somewhere else. I'm curious why Goedendag and Ballista are working thou and the rest not. Maybe loading sequence of luas can help...

To reproduce lua errors just load mod and start game. Nothing more.
 
Last edited:
The first one is NULL value in PediaEntry field in UnitPromotions. Check DB after loading the mod which promo has this issue.
The second one is actually very interesting. Could be the reason for FireTuner crashes, will investigate.
 
@Infixo how to find max religiontypes? I mean something like this: DirectionTypes.NUM_DIRECTION_TYPE bu for religion types? I need it to put into "for" loop instead of flat integer which can be changed.
DirectuonTypes is actually an exception because it is normal enum, doesn’t have associated table. All other just use e.g.
Code:
for rel in GameInfo.Religions() do ... end
 
Chasqui and Tambo had those null issues. Checking if they were the only ones.
 
PROMOTION_CHASQUI_GOLD
PROMOTION_CHASQUI_HEAL
PROMOTION_CHASQUI_HEAL_DUMMY
PROMOTION_COCA_MILITARY
PROMOTION_COCA_WORKER
missing PediaType and PediaEntry

PROMOTION_COAST_MOVE
PROMOTION_DECK_SPIKES
missing PediaEntry

There are also 2 bugs in db.log
 
I just found Korean one :p

Do you have any idea why luas I mentioned don't work? Can this be related to that lua error?
 
First lua error is gone.
Database.log still have issues.
 
I merged my part. Check this too.
 
@Infixo In game bug still exists. Luas still do not work.
 
I did one per turn and reworked Chasqui according to github conversation. I will stop changing anything until you tell me to start.

@Infixo Change check for unitype to unitpromotion in chaqui lua. You can also safely delete commented parts. Look into my part and simplify it to Once per turn heal. It will be enough. No need to check actions.
Code:
include("FLuaVector.lua")

function Chasquiwasi(iPlayer, iUnit)
    local pPlayer = Players[iPlayer]
       
    for pUnit in pPlayer:Units() do
        if pUnit:IsHasPromotion(GameInfoTypes.PROMOTION_CHASQUI_HEAL) then
            local pPlot = Map.GetPlot(pUnit:GetX(), pUnit:GetY())

            if pPlot:GetOwner() == pPlayer then
                pUnit:ChangeDamage(-10)
            end
        end
    end
end

GameEvents.PlayerDoTurn.Add(Chasquiwasi)
 
Last edited:
pUnit:ChangeDamage(-10)
This would stack with the heal from fortify, no?

sorry about the multiple sql bugs. I thought hokath had said he had QA'd them, so I didn't think there would be so many issues. Ultimately it was my code and my merge though, so that's on me
 
This will stack. It will check at the bignning of the turn if unit is on it own ground and has promotion, then do simple heal. If unit is fortified there will be second heal at the end of turn.

That's an effect of not checking your code. Sometimes you miss something like I did in latifundia or other issues. But those were basic db and lua errors which prevented code from working. Now I hope @Infixo will manage to do something with those lua issues I mentioned before. Those were well working code parts and now they just don't work. I'm waiting for some good news.
 
OK. The current version of master:
- I am able to compile entire project with no errors
- I load the mod with no DB errors nor warnings
- I start the game with no Lua errors (inc. no InGame errors)
- I can auto-play the game for 20 turns with no Lua errors
It means that all SQL and Lua stuff has correct syntax and all generic Lua functions called every turn don't produce errors.

The above doesn't mean that all works as intended - testing is needed.
 
The explanation for InGame.lua errors
The problem was with incorrect filename for Lua script in UIAddin section. Basically somebody changed the folder name but forgot to change the corresponding Lua filename. Modbuddy only changes filenames in general loading section (DB updates), doesn't change Lua filenames because they are entered manually in the first place.
 
Status
Not open for further replies.
Back
Top Bottom