Python Forum
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Py3 Data Resource file help
#1
Hello all, I’m creating a little game as part of a learning exercise. I’m not using any game-oriented libraries nor do I want to, this is to help me learn/understand core(or at least close to it) python. Basically what I’m trying to do is create a separate resource file that defines all of the game’s weapons and weapon’s attributes in a separate file that I can call on when needed. I’m having a hard time figuring it out. Should it be a module that can be imported? Or is there a better file type/way? I’ve been messing around with the module idea and trying to define each item separately as a function but I don’t think I’m fully understanding. Just for an example let’s say I wanted a weapon to be named “Wooden Axe” with a damage of 1 and size (defining inventory space elsewhere) of 5. Any help is appreciated
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to set CPU and memory resource SriRajesh 1 369 Aug-16-2021, 05:23 PM
Last Post: Larz60+
  xml file creation from an XML file template and data from an excel file naji_python 1 755 Dec-21-2020, 03:24 PM
Last Post: Gribouillis
  saving data from text file to CSV file in python having delimiter as space K11 1 872 Sep-11-2020, 06:28 AM
Last Post: bowlofred
  How to save CSV file data into the Azure Data Lake Storage Gen2 table? Mangesh121 0 934 Jun-26-2020, 11:59 AM
Last Post: Mangesh121
  Process Data from one csv file and write to another CSV file specific column ajin9581 1 958 Jun-17-2020, 06:00 PM
Last Post: buran
  Problem importing resource library ChrisM 8 1,761 Oct-23-2019, 01:40 PM
Last Post: ChrisM
  Resource Monitoring MuntyScruntfundle 1 1,234 Feb-20-2019, 10:00 PM
Last Post: Larz60+
  Paramiko resource shortage error jkey 0 2,350 Sep-17-2018, 01:18 PM
Last Post: jkey
  'OSError: [Errno 16] Device or resource busy' for ralationship with ds1307 gray 4 6,162 Jul-31-2017, 02:17 AM
Last Post: jackbk

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020