Vertical 204 x horizontal 197
Roughly speaking, I programmed in Python. I think it took about 2 hours to build the environment and prepare the blueprints. After that, run the program and make an instant! It was completed by making fine adjustments after creation.
From the following, I will write an outline of the procedure.
I borrowed it from here. https://bibi-star.jp/posts/6881
It is a site that outputs an Excel dot picture file when the original image is read. Pixel art Nanika
Since it is not a Minecraft block code etc. in the output Excel, Reset the corresponding color. This is a little annoying.
In the case of Levi, the settings were reset as follows.
Color number output to Excel: Color number set in Excel output by pixel art Nanika Block number: Minecraft block number (24: sandstone, 35: wool) Block data number: A number that becomes a branch number of the block number (corresponding to the type of block number)
block number Block data number
Details will be given to the following site. https://www.python.jp/install/windows/install.html
For the installation of Forge and Raspberry Jam Mod, refer to the following. Minecraft 5 steps to do python programming in
In my case, since the version of Minecraft was 1.16.4, Forge also installed 1.16.4, but I could not read it well probably because the version that can be used with "Raspberry Jam Mod" is different, so 1.12.2 (Raspberry) It matches the latest version of Jam Mod).
Raspberry Jam Mod downloads "mods.zip" from the following. https://github.com/arpruss/raspberryjammod/releases/tag/0.94
Of the unzipped folders, "RaspberryJamMod.jar" in 1.12.2, Place it in your Minecraft mods folder.
Converts the color code in Excel to the color code in Minecraft. I made my own (VBA) conversion tool that corresponds to the previous setting.
The color code of Minecroft is "block number_block data number", I try to separate them with an underscore (_). This is to make it easier to handle later on the Python side.
module.bas
Sub main()
'//Speeding up
Application.ScreenUpdating = False 'Stop drawing
Application.EnableEvents = False 'Event suppression
Application.Calculation = xlCalculationManual 'Manual calculation
'//Acquisition source sheet
Dim targetSt As Worksheet: Set targetSt = ThisWorkbook.Worksheets("dot-e-nanika")
'//Setting sheet
Dim colorConfig As Worksheet: Set colorConfig = ThisWorkbook.Worksheets("Color setting")
Dim configRange As Range: Set configRange = colorConfig.Range("A2:A16")
'//Rightmost,Get the bottom
Dim cols, rows As Long
cols = 197
rows = 204
'//Array
Dim blockDataArray() As String
ReDim blockDataArray(rows - 1, cols - 1)
'//Vertical loop
For i = 1 To rows
'//Horizontal loop
For j = 1 To cols
'//Get value
targetVal = Cells(i, j)
Set findRng = configRange.Find(What:=targetVal, LookIn:=xlValues, LookAt:=xlWhole)
'//conversion
blockData = "Nothing"
If Not findRng Is Nothing Then
blockNo = findRng.Offset(0, 1)
blockDataNo = findRng.Offset(0, 2)
blockData = "'" & blockNo & "_" & blockDataNo & "'"
End If
'//Store in array
blockDataArray(i - 1, j - 1) = blockData
Next j
Next i
'//Output the array to another sheet
Worksheets.Add after:=Worksheets(Worksheets.Count)
For i = 0 To rows - 1
colors_str = "["
For j = 0 To cols - 1
colors_str = colors_str & blockDataArray(i, j)
If j < cols - 1 Then
colors_str = colors_str & ","
End If
Next j
colors_str = colors_str + "]"
If i < rows - 1 Then
colors_str = colors_str & ","
End If
ActiveSheet.Cells(i + 1, 1) = colors_str
Next i
'//Release speed
Application.ScreenUpdating = True
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
End Sub
Output result
['35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0','35_0'],
… (Similar matrix continues up to line 204)
dot_levi.py
import mcpi.minecraft as minecraft
mc = minecraft.Minecraft()
x, y, z = mc.player.getPos()
rows = 204
cols = 197
colors = [
#The color code output by VBA is entered here.
]
for i in range(rows):
row = colors[i]
for j in range(cols):
blockNo, blockDataNo = row[j].split('_')
mc.setBlock(x + j, y + rows - i, z, int(blockNo), int(blockDataNo))
blockNo, blockDataNo = row[j].split('')
⇒ Here, the block number and block data number separated by an underscore () are stored in each variable.
If you fix it to one block number, it will not be possible to handle if there is a color you want to use other than that block number, so I tried to keep it in this format.
As a result, "smooth sandstone (24_8])" and wool (35_XX), which are close to the skin color, are added.
I am trying to handle it at the same time.
・ Start Minecraft. -At the command prompt, move to the folder where dot_levi.py is located, and Type python dot_levi.py and press Enter.
-Large-scale pixel art can be programmed with Python. -To program Python, you need to install Python / Forge / Raspberry Jam Mod. ・ If you use a site called Pixel Art Nanika, you can almost complete the blueprint. -In order to give flexibility in specifying the block at the time of creation, it is recommended to use the format "block number_block data number". -You can make anything if you have the original image, blueprint, and color code corresponding to Micra! !!
Recommended Posts