Jump to content

stanislas69

0 A.D. Art Team
  • Content Count

    8,165
  • Joined

  • Last visited

  • Days Won

    213

stanislas69 last won the day on February 6

stanislas69 had the most liked content!

Community Reputation

4,133 Excellent

About stanislas69

  • Rank
    Forum's Butler
  • Birthday 05/05/1994

Previous Fields

  • First Name
    Stanislas
  • Last Name
    Dolcini
  • Skype ID
    stanislas.dolcini

Profile Information

  • Gender
    Male
  • Location
    Sèvres, France

Recent Profile Visitors

5,981 profile views
  1. stanislas69

    Multiplayer lobby crash after 23 alpha re-release

    You can download this version: https://www.mediafire.com/file/00lxxtdmsu64nrs/0ad-0.0.23b-alpha-osx64.dmg/file It should be fixed in it. Let me know if it works for you. Sorry for the inconvenience.
  2. stanislas69

    How to deselect?

    @feneur Can you lift the post restriction of @Super_player0AD, please ?
  3. stanislas69

    ==[TASK]== Horse Update 2.0 (Retexture)

    You need a better specmap but it looks better now. The blonde hair looks a bit weird. I guess that's because of the specmap but the hair looks wet
  4. stanislas69

    ==[TASK]== Tree poly reduction

    1. @aeonios Could you tell me if the following gaia.7z tree_cretan_date palms are better ? Also could you run some kind of profiling to see what kind of performance drop we are dealing with ?
  5. Hello @Alex from Intel I'm Stan from 0 A.D. Welcome to the forums I'm also available on the forums on IRC and by PM if you have any questions that get unanswered. Hope this will improve the game
  6. My definition was more components that are required for the game to work
  7. stanislas69

    13th Century Europe Mod - In Development

    Well done they look very nice. You should probably edit the unit mesh for them though Just grab the new unit meshes blend file let me know if you don't know where to find it.
  8. Also schemas contain examples that are useful for modders and the purpose of mod mod is to be the engine mod so that could make sense.
  9. Well CmpTimer is an engine component
  10. That's not changing. Still a property. It's just initiated by being run. That's more troublesome but you can rely on stuff like the hack above or just append the code. It's a string after all The engine schemas could be along the js ones. After all they are both components and this way easier to access for modders.
  11. I've been recently annoyed by having to edit indented strings in the ingame components and I was wondering if it wouldn't have been nice to have them as separate xml files instead. here is an example for the current resource supply component. diff --git a/binaries/data/mods/public/simulation/components/ResourceSupply.js b/binaries/data/mods/public/simulation/components/ResourceSupply.js index a015a190ee..1bc2ee9a5d 100644 --- a/binaries/data/mods/public/simulation/components/ResourceSupply.js +++ b/binaries/data/mods/public/simulation/components/ResourceSupply.js @@ -1,89 +1,7 @@ function ResourceSupply() {} -ResourceSupply.prototype.Schema = - "<a:help>Provides a supply of one particular type of resource.</a:help>" + - "<a:example>" + - "<Amount>1000</Amount>" + - "<MaxAmount>1500</MaxAmount>" + - "<Type>food.meat</Type>" + - "<KillBeforeGather>false</KillBeforeGather>" + - "<MaxGatherers>25</MaxGatherers>" + - "<DiminishingReturns>0.8</DiminishingReturns>" + - "<Change>" + - "<AnyName>" + - "<Constraint>Alive</Constraint>" + - "<Value>2</Value>" + - "<Interval>1000</Interval>" + - "</AnyName>" + - "<Growth>" + - "<Constraint>Alive</Constraint>" + - "<Value>2</Value>" + - "<Interval>1000</Interval>" + - "</Growth>" + - "<Decay>" + - "<Constraint>Dead</Constraint>" + - "<Value>-1</Value>" + - "<Interval>1000</Interval>" + - "<Delay>2000</Delay>" + - "<Limit>500</Limit>" + - "</Decay>" + - "</Change>" + - "</a:example>" + - "<element name='KillBeforeGather' a:help='Whether this entity must be killed (health reduced to 0) before its resources can be gathered'>" + - "<data type='boolean'/>" + - "</element>" + - "<element name='Amount' a:help='Amount of resources available from this entity'>" + - "<choice><data type='nonNegativeInteger'/><value>Infinity</value></choice>" + - "</element>" + - "<optional>" + - "<element name='MaxAmount' a:help='The max amount of resource the entity can reach when growing'>" + - "<ref name='nonNegativeDecimal'/>" + - "</element>" + - "</optional>" + - "<element name='Type' a:help='Type and Subtype of resource available from this entity'>" + - Resources.BuildChoicesSchema(true, true) + - "</element>" + - "<element name='MaxGatherers' a:help='Amount of gatherers who can gather resources from this entity at the same time'>" + - "<data type='nonNegativeInteger'/>" + - "</element>" + - "<optional>" + - "<element name='DiminishingReturns' a:help='The relative rate of any new gatherer compared to the previous one (geometric sequence). Leave the element out for no diminishing returns.'>" + - "<ref name='positiveDecimal'/>" + - "</element>" + - "</optional>" + - "<optional>" + - "<element name='Change' a:help='Optional element containing all the modifications that affects a resource supply'>" + - "<zeroOrMore>" + - "<element a:help='Optional element defining whether and how a resource supply regenerates or decays'>" + - "<anyName/>" + - "<interleave>" + - "<optional>" + - "<element name='Constraint' a:help='Specifies the health constraint for the change to be active'>" + - "<choice>" + - "<value>Alive</value>" + - "<value>Dead</value>" + - "</choice>" + - "</element>" + - "</optional>" + - "<element name='Delay' a:help='Delay in milliseconds before the object starts growing or decaying'>" + - "<ref name='nonNegativeDecimal'/>" + - "</element>" + - "<element name='Value' a:help='The amount of resource added per interval'>" + - "<data type='decimal'/>" + - "</element>" + - "<element name='Interval' a:help='The interval in milliseconds'>" + - "<data type='positiveInteger'/>" + - "</element>" + - "<optional>" + - "<element name='Limit' a:help='The upper or bottom limit of the value after which the change has no effect'>" + - "<data type='nonNegativeInteger'/>" + - "</element>" + - "</optional>" + - "</interleave>" + - "</element>" + - "</zeroOrMore>" + - "</element>" + - "</optional>"; +ResourceSupply.prototype.Schema = Engine.ReadFile("simulation/components/schemas/ResourceSupply.xml").replace("Resources.BuildChoicesSchema(true, true)", Resources.BuildChoicesSchema(true, true)); + ResourceSupply.prototype.Init = function() { diff --git a/source/ps/scripting/JSInterface_VFS.cpp b/source/ps/scripting/JSInterface_VFS.cpp index ec1a1d0572..71840a513b 100644 --- a/source/ps/scripting/JSInterface_VFS.cpp +++ b/source/ps/scripting/JSInterface_VFS.cpp @@ -268,6 +268,7 @@ void JSI_VFS::RegisterScriptFunctions_Simulation(const ScriptInterface& scriptIn scriptInterface.RegisterFunction<JS::Value, std::wstring, std::wstring, bool, &Script_ListDirectoryFiles_Simulation>("ListDirectoryFiles"); scriptInterface.RegisterFunction<bool, std::wstring, Script_FileExists_Simulation>("FileExists"); scriptInterface.RegisterFunction<JS::Value, std::wstring, &Script_ReadJSONFile_Simulation>("ReadJSONFile"); + scriptInterface.RegisterFunction<JS::Value, std::wstring, & JSI_VFS::ReadFile>("ReadFile"); } void JSI_VFS::RegisterScriptFunctions_Maps(const ScriptInterface& scriptInterface) And the side file in simulation/components/schemas <?xml version="1.0" encoding="UTF-8"?> <a:help>Provides a supply of one particular type of resource.</a:help> <a:example> <Amount>1000</Amount> <MaxAmount>1500</MaxAmount> <Type>food.meat</Type> <KillBeforeGather>false</KillBeforeGather> <MaxGatherers>25</MaxGatherers> <DiminishingReturns>0.8</DiminishingReturns> <Change> <AnyName> <Constraint>Alive</Constraint> <Value>2</Value> <Interval>1000</Interval> </AnyName> <Growth> <Constraint>Alive</Constraint> <Value>2</Value> <Interval>1000</Interval> </Growth> <Decay> <Constraint>Dead</Constraint> <Value>-1</Value> <Interval>1000</Interval> <Delay>2000</Delay> <Limit>500</Limit> </Decay> </Change> </a:example> <element name="KillBeforeGather" a:help="Whether this entity must be killed (health reduced to 0) before its resources can be gathered"> <data type="boolean"/> </element> <element name="Amount" a:help="Amount of resources available from this entity"> <choice> <data type="nonNegativeInteger"/> <value>Infinity</value> </choice> </element> <optional> <element name="MaxAmount" a:help="The max amount of resource the entity can reach when growing"> <ref name="nonNegativeDecimal"/> </element> </optional> <element name="Type" a:help="Type and Subtype of resource available from this entity"> Resources.BuildChoicesSchema(true, true) </element> <element name="MaxGatherers" a:help="Amount of gatherers who can gather resources from this entity at the same time"> <data type="nonNegativeInteger"/> </element> <optional> <element name="DiminishingReturns" a:help="The relative rate of any new gatherer compared to the previous one (geometric sequence). Leave the element out for no diminishing returns."> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="Change" a:help="Optional element containing all the modifications that affects a resource supply"> <zeroOrMore> <element a:help="Optional element defining whether and how a resource supply regenerates or decays"> <anyName/> <interleave> <optional> <element name="Constraint" a:help="Specifies the health constraint for the change to be active"> <choice> <value>Alive</value> <value>Dead</value> </choice> </element> </optional> <element name="Delay" a:help="Delay in milliseconds before the object starts growing or decaying"> <ref name="nonNegativeDecimal"/> </element> <element name="Value" a:help="The amount of resource added per interval"> <data type="decimal"/> </element> <element name="Interval" a:help="The interval in milliseconds"> <data type="positiveInteger"/> </element> <optional> <element name="Limit" a:help="The upper or bottom limit of the value after which the change has no effect"> <data type="nonNegativeInteger"/> </element> </optional> </interleave> </element> </zeroOrMore> </element> </optional>
  12. stanislas69

    How to deselect?

    Pressing Esc ?
  13. stanislas69

    Alpha, Player Color and Atlas

    Glad I could help. Happy modding.
  14. stanislas69

    Alpha, Player Color and Atlas

    Alpha transparency is a bit tricky to get right. Usually you add a 2% visible white layer below the one with transparency in Gimp. You can also use the fade to alpha tool in Gimp add another transparent layer. Select the transparent areas and past them on the bottom layer reducing the visibility by trial and error until it retains enough details and still displays color. Areas you want to be player color should be shades of grey
  15. stanislas69

    Black powder test

    I want to crash my game
×