What's your ideal Scripting Situation?

Discussion in 'Civ6 - Creation & Customization' started by sukritact, Jun 1, 2016.

  1. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,570
    Location:
    Near Portsmouth, UK
    Anything that doesn't require commercial (ie paid for) third party libraries/environments to debug the base game code

    Spoiler :

    For CivV Lua coders who've not played with CivBE this is what I'm talking about

    Code:
    local DEBUG_CACHE_SCREEN_NAME	[COLOR="red"][B]:string[/B][/COLOR] = "ArtifactsPopup";
    local DEBUG_SHOW_INFO			:boolean= false;
    local DROP_OVERLAP_REQUIRED		:number = 0.4;
    local CATEGORY_ICONS_ATLAS		:string = "ARTIFACT_CATEGORY_ATLAS"
    local HEADER_WIDTH_NO_SCROLLBAR :number = 472;
    local HEADER_WIDTH_SCROLLBAR	:number = HEADER_WIDTH_NO_SCROLLBAR - 16;
    
    local SelectedType				:table = {};
    local WasShown					:boolean = false;
    
    Code:
    [COLOR="red"][B]hstructure [/B][/COLOR]ArtifactDataStruct
    	Category		: string
    	CategoryInfo	: string
    	ExplanationInfo	: string
    	Description		: string
    	IconAtlas		: string
    	PortraitIndex	: number
    	Type			: string
    	UniqueID		: number	-- while named "index" in engine is actually unique ID
    	Condition		: number
    	UIPriority		: number
    end
    
    Code:
    	-- Obtain data.
    	local artifacts : table = m_player:GetArtifactData();
    	for _,artifactPlayer:table in ipairs(artifacts) do
    		local artifact		: table = GameInfo.Artifacts[artifactPlayer.Type];
    		local artifactData	: ArtifactDataStruct = [COLOR="Red"][B]hmake [/B][/COLOR]ArtifactDataStruct {
    			Category		= artifact.Category,
    			CategoryInfo	= GameInfo.ArtifactCategories[artifact.Category].Description,
    			Condition		= m_player:GetArtifactValueAtIndex(artifactPlayer.Index),
    			ExplanationInfo	= artifact.Explanation,
    			Description		= artifact.Description,
    			IconAtlas		= artifact.IconAtlas,
    			PortraitIndex	= artifact.PortraitIndex,
    			Type			= artifact.Type,
    			UniqueID		= artifactPlayer.Index,			
    			UIPriority		= GameInfo.ArtifactCategories[artifact.Category].UIPriority
    		};
    		table.insert( data, artifactData);
    	end
    
     
  2. AbsintheRed

    AbsintheRed Deity

    Joined:
    Jul 27, 2009
    Messages:
    8,288
    Location:
    Szeged, Hungary
    Agreed, i'm also all for python
     
  3. MrUnderhill

    MrUnderhill Civ-loving Hobbit

    Joined:
    Dec 6, 2005
    Messages:
    655
    There's actually a language called MoonScript that compiles to Lua and looks like Python, whitespace-sensitivity and all. Maybe we can have the best of both worlds?
     
  4. Putmalk

    Putmalk Deity

    Joined:
    Sep 26, 2010
    Messages:
    2,623
    Location:
    New York
    JSON would be so much easier to work with. Less brackets, more readability.
     
  5. Homusubi

    Homusubi Lafcadio Hearn Wannabe

    Joined:
    Dec 21, 2012
    Messages:
    1,035
    Isn't JSON the one with too many square brackets?
     
  6. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,479
    Location:
    Portugal
    There is not a standard yet, Firaxis can use can use their one format.
     
  7. greyTiger

    greyTiger Warlord

    Joined:
    Oct 7, 2010
    Messages:
    198
    Location:
    Australia
    Agree 100% with these points. Ideal scenario for me would be C#, XML and SQL combination. I've used these on large scale database applications since 2002 and have recently started using C# in Unity to create mobile games, so I would feel very comfortable coding with these tools.
     
  8. croxis

    croxis Chat room op

    Joined:
    Dec 17, 2001
    Messages:
    3,277
    Location:
    Portland, OR, US
    As much as I love python it is a pain to sandbox, making some nasty things possible (with Firaxis taking the blame for it). Whatever it is I would love access to sockets.
     
  9. mnf

    mnf King

    Joined:
    Jan 31, 2006
    Messages:
    659
    So much this! Modding CivBE gave me the impression that the API consists of what they needed while they were building the game. It felt like the API was not really something that was designed, but just something that came to be. A by-product of building the game. The lack of documentation was also very frustrating for amateurs like me. Perhaps the real programmers had no problem reading between the lines and automatically get a grasp of the whole platform, but I had quite a bit of trouble.

    So a properly designed and documented API is really the one thing I'd ask for.
     
  10. Ramkhamhaeng

    Ramkhamhaeng Warlord

    Joined:
    Feb 24, 2014
    Messages:
    191
    Moreover, in most cases it is possible to edit the Python files while Civ4 is running. They will be reloaded on the fly which made the testing faster. :) (Unfortunately, it doesn't work under Wine…)

    I'm wondering why we still had to speculate about the script language?! The game will be released in 9 days and for Civ4 the information was given many weeks or month before.
     
  11. mnf

    mnf King

    Joined:
    Jan 31, 2006
    Messages:
    659
    Same here. I understand releasing the API is going to interfere with the pre-release information exposure plan, but even something small like "it's going to use so-and-so language, and the full API documentation plus the SDK environment is going online at release as well" would have got so many modders hypped about it as well.
     
  12. Hajee

    Hajee Prince

    Joined:
    Nov 4, 2014
    Messages:
    342
    Civ 6 to use Python or lua? which one is easy to learn?
     
  13. AbsintheRed

    AbsintheRed Deity

    Joined:
    Jul 27, 2009
    Messages:
    8,288
    Location:
    Szeged, Hungary
    Disappointment in this regard as well...
     

Share This Page